>I need your help in creating a calendar that converts the dates from
>Gregorian Calendar to Afghani Calendar. Afghani Calendar is solar
[quoted text clipped - 5 lines]
>Afghani Calendar is march 20 or 21 (depends on which day is the first
>day of spring). So the new year 1/1/2006 is 3/20/1385.
That doesn't look right; shouldn't that be "1/1/1385 is 3/20/2006"?
>I would like to create a excel file that does this conversion and as
>well show the month and days graphically. :rolleyes:
What about months? How long are they and how many are there? And some
years must have a number of days other than 365 depending on the true
vernal equinox in the adjacent years, no?
In principle, I think one has to compute an "absolute" day number, often
called the Julian day number, from the Gregorian calendar. This is often
based on the date 1-Jan-4713 BC. Then with some MOD and integer division
one should get the Afghani date.
However, the true date of the vernal equinox, which can be March 19, 20,
21, is probably a non-trivial algorithm; "Astronomical Algorithms" (Jean
Meeus) might help. There are several web sites which show a JavaScript
implementations; here's one:
<http://www.stellafane.com/misc/equinox.html>. Good luck.

Signature
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
kjaan - 25 Jul 2006 16:45 GMT
Michael,
I did make a type in that 1/1/1385 = 3/20/2006.
The calendar consists of 12 months, the first six of which are 31 days,
the next five 30 days, and the final month 29 days in a normal year and
30 days in a leap year. As one of the few calendars designed in the era
of accurate positional astronomy, the Persian calendar uses a very
complex leap year structure which makes it the most accurate solar
calendar in use today. Years are grouped into cycles which begin with
four normal years after which every fourth subsequent year in the cycle
is a leap year. Cycles are grouped into grand cycles of either 128 years
(composed of cycles of 29, 33, 33, and 33 years) or 132 years,
containing cycles of of 29, 33, 33, and 37 years. A great grand cycle
is composed of 21 consecutive 128 year grand cycles and a final 132
grand cycle, for a total of 2820 years. The pattern of normal and leap
years which began in 1925 will not repeat until the year 4745!
Each 2820 year great grand cycle contains 2137 normal years of 365 days
and 683 leap years of 366 days, with the average year length over the
great grand cycle of 365.24219852. So close is this to the actual solar
tropical year of 365.24219878 days that the Persian calendar accumulates
an error of one day only every 3.8 million years. As a purely solar
calendar, months are not synchronised with the phases of the Moon.

Signature
kjaan
kjaan - 28 Jul 2006 07:31 GMT
anyone out there to help me on this problem. Thanks

Signature
kjaan
Michael Bednarek - 28 Jul 2006 08:51 GMT
>anyone out there to help me on this problem. Thanks
This is a non-trivial problem where not many people are sufficiently
familiar with either one of the calendars involved; most people would be
hard pressed to come up with an algorithm to convert in both directions
between Gregorian dates and Julian days; even fewer, myself included,
have any grasp of the Persian calendar.
You are probably much better equipped to tackle this problem yourself,
either by writing VBA code or even with researching existing approaches.
A web search for "persian calendar conversion" showed many promising
results. Maybe one of them has their algorithm published.
Good luck.

Signature
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"