I am making a simple symbian app in Python which will take Gregorian calendar date from user and convert it to Vikram Sanvat /Shak samvat of Vedic calendar.
unfortunately, the hindu calendar varies much from the our de-facto system in no. of days in months. So, I am looking for an algorithm which does it effectively , otherwise, I will have to write it from scratch which may have some bugs(in dates). the app first calculates the time in seconds(unix epoch way) then converts it to gregorian. This info be of help,if any.
More reference here: http://en.wikipedia.org/wiki/Bikram_Samwat
On Friday 09 July 2010 03:41:44 Pratik Anand wrote:
unfortunately, the hindu calendar varies much from the our de-facto system in no. of days in months.
I tried that once for the tamil calendar, and gave up when I realised that it follows a 60 year cycle - impossible to capture in an algorithm
why not ? if its cyclical can be captured in algorithm http://en.wikipedia.org/wiki/Indian_national_calendar this may help
On Fri, Jul 9, 2010 at 4:36 AM, Kenneth Gonsalves lawgon@au-kbc.org wrote:
On Friday 09 July 2010 03:41:44 Pratik Anand wrote:
unfortunately, the hindu calendar varies much from the our de-facto
system
in no. of days in months.
I tried that once for the tamil calendar, and gave up when I realised that it follows a 60 year cycle - impossible to capture in an algorithm -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- http://mm.glug-bom.org/mailman/listinfo/linuxers
On Friday 09 July 2010 10:22:26 sudheer k muhammed wrote:
why not ? if its cyclical can be captured in algorithm http://en.wikipedia.org/wiki/Indian_national_calendar this may help
I am talking about the tamil calendar - I sat with various wise men (this was before wikipedia was invented and made all of us wise men) and none of them could give a logical explanation or formula for computing this - apart from loading the whole 60 year cycle into the formula. So I gave up.
ps. please refrain from top posting
On Fri, Jul 9, 2010 at 11:23 AM, Kenneth Gonsalves lawgon@au-kbc.orgwrote:
On Friday 09 July 2010 10:22:26 sudheer k muhammed wrote:
why not ? if its cyclical can be captured in algorithm http://en.wikipedia.org/wiki/Indian_national_calendar this may help
I am talking about the tamil calendar - I sat with various wise men (this was before wikipedia was invented and made all of us wise men) and none of them could give a logical explanation or formula for computing this - apart from loading the whole 60 year cycle into the formula. So I gave up.
well, if something do not have a formula, it can be a database. May be a insufficient mapping for each and every second with corresponding Brikam Samvat. It can be hosted somewhere.
just a {}00B suggestion..
@nsisodiya But mainintaing a database will require certain checkpoints. Like if we know at a certain time , the bikram sanvat date was such and such then we can find dates before and after it upto certain dates. But , that kind of way won't be useful if I want to find a date in real past or future, say Birth of Christ in Bikram samvat.
On Sat, Jul 10, 2010 at 5:41 PM, Pratik Anand pratik.preet@gmail.comwrote:
@nsisodiya But mainintaing a database will require certain checkpoints.
can you explain more ?
Like if we know at a certain time , the bikram sanvat date was such and such then we can find dates before and after it upto certain dates. But , that kind of way won't be useful if I want to find a date in real past or future, say Birth of Christ in Bikram samvat.
As, it was told, that it has 60 years cycles. I do not find the difficulty (logical).
@nsisodiya
by your mentioning of databases, i perceived that we can have a stored db of some imp. dates whose Bikram Samvat dates are known and thus, nearby dates can be calculated.
and 60 yrs. cycles...well, have to find more on it. have put this one on hold, till I learn enough fabout unctioning of indian calendars...
On Saturday 10 July 2010 19:50:48 narendra sisodiya wrote:
Like if we know at a certain time , the bikram sanvat date was such and such then we can find dates before and after it upto certain dates. But , that kind of way won't be useful if I want to find a date in real past or future, say Birth of Christ in Bikram samvat.
As, it was told, that it has 60 years cycles. I do not find the difficulty (logical).
it does not follow what westerners call logic - within the sixty years, wise men look at the stars and moon and decide what starts when. This was about 20 years ago, so I am hazy about the details, but a concrete example is the month of Ramazan in the muslim calendar - that ends when a certain designated person in each part of the world sights the new moon - so at the most a computer program can predict the date with a margin of error of two days. Multiply that error by sighting the position of stars etc - better to program a killy.
On Sunday 11 July 2010 10:48:21 Kenneth Gonsalves wrote:
program can predict the date with a margin of error of two days. Multiply that error by sighting the position of stars etc - better to program a killy.
oops, did not realise this was Mumbai lug. Killy is the Tamil word for parrot.
On Friday 09 Jul 2010, Pratik Anand wrote:
I am making a simple symbian app in Python which will take Gregorian calendar date from user and convert it to Vikram Sanvat /Shak samvat of Vedic calendar.
With a bit of Googling I managed to find:
http://www.math.nus.edu.sg/aslaksen/projects/lcl.pdf
which goes into calculations in great detail and also has code (I think in Mathematica) embedded. Apart from that, there are a few links that may be useful at:
http://www.math.nus.edu.sg/aslaksen/calendar/indian.shtml
And finally, a look at the Astrolog source code may be be able to give you some insight into the calculations themselves... Astrolog does do a Vedic chart too, so presumably it can do calculations for Indian calendars.
I'd appreciate it if you (a) released whatever code you write under a FOSS licence and (b) kept the list (or at least me) posted on progress in the app.
Now over to the GPL vs BSD fanatics who will help you decide which licence to use for your code ;-)
Regards,
-- Raju
Hi,
On Fri, Jul 9, 2010 at 3:41 AM, Pratik Anand pratik.preet@gmail.com wrote:
unfortunately, the hindu calendar varies much from the our de-facto
system
in no. of days in months. So, I am looking for an algorithm which does it effectively , otherwise, I will have to write it from scratch which may have some bugs(in dates). the app first calculates the time in seconds(unix epoch way) then converts it to gregorian. This info be of help,if any.
Why writing from scratch should be difficult ?
From the wiki link provided by Sudheer:
http://en.wikipedia.org/wiki/Indian_national_calendar
Chaitra 1, 1879 Saka Era, == March 22, 1957
Consider this as your 'epoch'. 1. Calculate no of days from epoch (ndays) e.g: 31 Aug, 2010 is '19521' http://www.timeanddate.com/date/durationresult.html?d1=31&m1=08&y1=2...
http://www.timeanddate.com/date/durationresult.html?d1=31&m1=08&y1=2010&d2=22&m2=03&y2=19572. Add 'ndays' to Chaitra 1, 1879 using the Indian calendaring system. the table gives number of days for each month and conditions for leap years / leap months are also given.
Both subtraction of dates and adding a duration to date, are standard exercise problems for first course in C programming.
Regards, Sourabh