PC Review


Reply
Thread Tools Rate Thread

Converting Dates between Gregorian to Afghani Calendar

 
 
kjaan
Guest
Posts: n/a
 
      25th Jul 2006

Hello,

I need your help in creating a calendar that converts the dates fro
Gregorian Calendar to Afghani Calendar. Afghani Calendar is sola
calendar which mean it has 365 days. It is not Lunar Calendar. So yea
2006 = 1385 afghani calendar. So this mean that G= A + 621 and A= G
621.

The problem I have is converting the months and days. The new year fo
Afghani Calendar is march 20 or 21 (depends on which day is the firs
day of spring). So the new year 1/1/2006 is 3/20/1385.

I would like to create a excel file that does this conversion and a
well show the month and days graphically. :rolleyes

--
kjaa
-----------------------------------------------------------------------
kjaan's Profile: http://www.excelforum.com/member.php...fo&userid=3673
View this thread: http://www.excelforum.com/showthread.php?threadid=56457

 
Reply With Quote
 
 
 
 
Michael Bednarek
Guest
Posts: n/a
 
      25th Jul 2006
On Tue, 25 Jul 2006 01:27:45 -0400, kjaan wrote in
microsoft.public.excel:

>I need your help in creating a calendar that converts the dates from
>Gregorian Calendar to Afghani Calendar. Afghani Calendar is solar
>calendar which mean it has 365 days. It is not Lunar Calendar. So year
>2006 = 1385 afghani calendar. So this mean that G= A + 621 and A= G-
>621.
>
>The problem I have is converting the months and days. The new year for
>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.


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.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
kjaan
Guest
Posts: n/a
 
      25th Jul 2006

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.


--
kjaan
------------------------------------------------------------------------
kjaan's Profile: http://www.excelforum.com/member.php...o&userid=36731
View this thread: http://www.excelforum.com/showthread...hreadid=564572

 
Reply With Quote
 
kjaan
Guest
Posts: n/a
 
      28th Jul 2006

anyone out there to help me on this problem. Thanks


--
kjaan
------------------------------------------------------------------------
kjaan's Profile: http://www.excelforum.com/member.php...o&userid=36731
View this thread: http://www.excelforum.com/showthread...hreadid=564572

 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      28th Jul 2006
On Fri, 28 Jul 2006 02:31:06 -0400, kjaan wrote in
microsoft.public.excel:

>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.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert date from Gregorian Calendar to Hijri Calendar H.Alkhodary Microsoft Excel Misc 1 21st Feb 2009 10:11 AM
dates format using gregorian and hijri calendars sarif Microsoft Excel Misc 0 12th Dec 2007 05:40 AM
converting hebrew to gregorian date =?Utf-8?B?cGVsZWdrMQ==?= Microsoft VB .NET 2 4th Jun 2007 07:29 AM
Toggle a range of Julian dates to Gregorian Dates and Back =?Utf-8?B?UFNLZWxsaWdhbg==?= Microsoft Excel Programming 4 8th May 2007 05:51 AM
Converting From Julian to Gregorian DateTime sunny076@yahoo.com Microsoft Dot NET 3 21st Oct 2005 11:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 AM.