The Calendar Converter

Posted on  by 



Convert the date from Hijri to Gregorian or from Gregorian to Hijri - Date Converter - Hijri and Gregorian - hijri to gregorian converter. The Jewish or Hebrew Calendar Converter will convert any date from the Gregorian Calendar into the equivalent date according to the Jewish Calendar. Adapted from Formilab's Calendar Converter. For information regarding any of the above calendars, please click on the link above. Convert dates between Ethiopian and European calendar. Application works offline. Today in Ethiopian Calendar is Megabit 30, 2013 03:34:41 p.m. European Date Fri, 09 Apr 2021 (at GMT+0). The Cholq’ij, or Calendar of Life, is the Maya tracking of time in relation to the conception and development of a human being until the time of birth.This calendar has 260 days (9 months in the Gregorian Calendar), which are divided into 13 months of 20 days or energies (Ch’umilal).From the moment of conception until birth there is a process of twenty cycles.

JD Calculator

What is Julian Date?
Compute the JD or UT yourself

The

To convert from JD to calendar date enter the Julian Date below:

To convert from UT to JD enter the time in UT:

This application assumes use of the Gregorian calendar and only works correctly for dates after 1858. For more on Julian Dates, click here.

JD Calendars

AAVSO produced JD Calendars give the last four digits of the Julian Day for each day of every month for a year. The months January-June are on one page while July–December are on the second page. For the complete JD, add 2,450,000 to the four digit value given in the calendar for the Astronomical Day of your observation.

Click on a year in the left column to download a 2-page .pdf version of the calendar for that year. The calendar for the 2021 is shown below. Click on the image to get a bigger version.

Calendars available for download
(in .pdf format):

If you need to download the Acrobat plug-in to read a pdf file, you may download it for free from the Adobe website.

Welcome to Fourmilab's calendar converter!This page allows you to interconvert dates in a variety ofcalendars, both civil and computer-related. Allcalculations are done in JavaScript executed in your ownbrowser; complete source code is embedded in or linked tothis page, and you're free to downloadthese files to your owncomputer and use them even when not connected to theInternet. To use the page, your browser must supportJavaScript and you must not have disabled execution of thatlanguage. Let's see...

Calendar

If the box above says 'Your browser supports JavaScript', you're in business;simply enter a date in any of the boxes below and press the 'Calculate'button to show that date in all of the other calendars.

Gregorian Calendar

The Gregorian calendar was proclaimed by Pope Gregory XIII and tookeffect in most Catholic states in 1582, in which October 4, 1582 ofthe Julian calendar was followed by October 15 in the new calendar,correcting for the accumulated discrepancy between the Julian calendarand the equinox as of that date. When comparing historical dates,it's important to note that the Gregorian calendar, used universallytoday in Western countries and in international commerce, wasadopted at different times by different countries. Britain and her colonies (including what is now the United States), did not switchto the Gregorian calendar until 1752, when Wednesday 2nd Septemberin the Julian calendar dawned as Thursday the 14th in the Gregorian.

The Gregorian calendar is a minor correction to the Julian. In theJulian calendar every fourth year is a leap year in which February has29, not 28 days, but in the Gregorian, years divisible by 100 arenot leap years unless they are also divisible by 400. Howprescient was Pope Gregory! Whatever the problems of Y2K, they won'tinclude sloppy programming which assumes every year divisible by 4 isa leap year since 2000, unlike the previous and subsequent yearsdivisible by 100, is a leap year. As in the Julian calendar,days are considered to begin at midnight.

The average length of a year in the Gregorian calendar is 365.2425days compared to the actual solar tropical year (time from equinox toequinox) of 365.24219878 days, so the calendar accumulates one day oferror with respect to the solar year about every 3300 years. As a purelysolar calendar, no attempt is made to synchronise the start of monthsto the phases of the Moon.

While one can't properly speak of 'Gregorian dates' prior tothe adoption of the calendar in 1582, the calendar can beextrapolated to prior dates. In doing so, thisimplementation uses the convention that the year prior toyear 1 is year 0. This differs from the Julian calendar inwhich there is no year 0--the year before year 1 in the Juliancalendar is year -1. The date December 30th, 0 in the Gregoriancalendar corresponds to January 1st, 1 in the Julian calendar.

A slight modification of the Gregorian calendar would make it even moreprecise. If you add the additional rule that years evenly divisibleby 4000 are not leap years, you obtain an average solar yearof 365.24225 days per year which, compared to the actual mean yearof 365.24219878, is equivalent to an error of one day over a periodof about 19,500 years; this is comparable to errors due to tidalbraking of the rotation of the Earth.

Julian Day

Astronomers, unlike historians, frequently need to do arithmeticwith dates. For example: a double star goes into eclipse every1583.6 days and its last mid-eclipse was measured to be onOctober 17, 2003 at 21:17 UTC. When is the next? Well, you couldget out your calendar and count days, but it's far easierto convert all the quantities in question to Julian day numbersand simply add or subtract. Julian days simply enumerate the daysand fraction which have elapsed since the start of theJulian era, which is defined as beginning at noonon Monday, 1st January of year 4713 B.C.E. in the Juliancalendar. This date is defined in terms of a cycle of years,but has the additional advantage that all known historical astronomicalobservations bear positive Julian day numbers, and periods canbe determined and events extrapolated by simple addition andsubtraction. Julian dates are a tad eccentric in starting atnoon, but then so are astronomers (and systems programmers!)--whenyou've become accustomed to rising after the 'crack of noon' anddoing most of your work when the Sun is down, you appreciaterecording your results in a calendar where the date doesn't changein the middle of your workday. But even the Julian day convention bears witness to the eurocentrism of 19th century astronomy--noonat Greenwich is midnight on the other side of the world. But the Julianday notation is so deeply embedded in astronomy that it is unlikelyto be displaced at any time in the foreseeable future. It is an idealsystem for storing dates in computer programs, free of cultural biasand discontinuities at various dates, and can be readily transformedinto other calendar systems, as the source code for this page illustrates.Use Julian days and fractions (stored in 64 bit or longer floatingpoint numbers) in your programs, and be ready for Y10K, Y100K,and Y1MM!

While any event in recorded human history can be written asa positive Julian day number, when working with contemporaryevents all those digits can be cumbersome. A ModifiedJulian Day (MJD) is created by subtracting 2400000.5from a Julian day number, and thus represents the number ofdays elapsed since midnight (00:00) Universal Time onNovember 17, 1858. Modified Julian Days are widely used tospecify the epoch in tables of orbital elements ofartificial Earth satellites. Since no such objects existedprior to October 4, 1957, all satellite-related MJDs arepositive.

Julian Calendar

The Julian calendar was proclaimed by Julius Cæsar in 46 B.C.and underwent several modifications before reaching its finalform in 8 C.E. The Julian calendar differs from the Gregorianonly in the determination of leap years, lacking the correctionfor years divisible by 100 and 400 in the Gregorian calendar.In the Julian calendar, any positive year is a leap year ifdivisible by 4. (Negative years are leap years if whendivided by 4 a remainder of 3 results.) Days are considered tobegin at midnight.

In the Julian calendar the average year has a length of 365.25 days.compared to the actual solar tropical yearof 365.24219878 days. The calendar thus accumulates one day oferror with respect to the solar year every 128 years.Being a purely solar calendar, no attempt is made to synchronise thestart of months to the phases of the Moon.

Hebrew Calendar

The Hebrew (or Jewish) calendar attempts to simultaneouslymaintain alignment between the months and the seasons andsynchronise months with the Moon--it is thus deemed a'luni-solar calendar'. In addition, there are constraintson which days of the week on which a year can begin and to shiftotherwise required extra days to prior years to keep thelength of the year within the prescribed bounds.This isn't easy, and thecomputations required are correspondingly intricate.

Years are classified as common (normal) orembolismic (leap) years which occur in a 19 yearcycle in years 3, 6, 8, 11, 14, 17, and 19. In anembolismic (leap) year, an extra month of 29 days,'Veadar' or 'Adar II', is added to the end of the year afterthe month 'Adar', which is designated 'Adar I' in suchyears. Further, years may be deficient,regular, or complete, having respectively353, 354, or 355 days in a common year and 383, 384, or 385days in embolismic years. Days are defined as beginning atsunset, and the calendar begins at sunset the night beforeMonday, October 7, 3761 B.C.E. in the Julian calendar, orJulian day 347995.5. Days are numbered with Sunday as day 1,through Saturday: day 7.

The average length of a month is 29.530594 days, extremely closeto the mean synodic month (time from new Moon tonext new Moon) of 29.530588 days. Such is the accuracy thatmore than 13,800 years elapse before a single daydiscrepancy between the calendar's average reckoning of thestart of months and the mean time of the new Moon.Alignment with the solar year is better than the Juliancalendar, but inferior to the Gregorian. The average lengthof a year is 365.2468 days compared to the actual solar tropicalyear (time from equinox to equinox) of 365.24219 days, sothe calendar accumulates one day of error with respect tothe solar year every 216 years.

Islamic Calendar

The Islamic calendar is purely lunar and consists of twelve alternatingmonths of 30 and 29 days, with the final 29 day month extended to30 days during leap years. Leap years follow a 30 year cycleand occur in years 1, 5, 7, 10, 13, 16, 18, 21, 24, 26, and 29.Days are considered to begin at sunset. The calendar beginson Friday, July 16th, 622 C.E. in the Julian calendar, Julianday 1948439.5, the day of Muhammad's flight from Mecca to Medina,with sunset on the preceding day reckoned as the first day ofthe first month of year 1 A.H.--'Anno Hegiræ'--the Arabic wordfor 'separate' or 'go away'. Weeks begin on Sunday, and thenames for the days are just their numbers: Sunday is the firstday and Saturday the seventh.

Each cycle of 30 years thus contains 19 normal years of 354days and 11 leap years of 355, so the average length of ayear is therefore ((19 × 354) + (11 × 355)) / 30 =354.365... days, with a mean length of month of 1/12 thisfigure, or 29.53055... days, which closely approximates themean synodic month (time from new Moon to next newMoon) of 29.530588 days, with the calendar only slipping oneday with respect to the Moon every 2525 years. Since the calendaris fixed to the Moon, not the solar year, the months shiftwith respect to the seasons, with each month beginning about11 days earlier in each successive solar year.

The calendar presented here is the most commonly usedcivil calendar in the Islamic world; for religious purposesmonths are defined to start with the first observation ofthe crescent of the new Moon.

Persian Calendar

The modern Persian calendar was adopted in 1925, supplanting(while retaining the month names of) a traditionalcalendar dating from the eleventh century. The calendarconsists of 12 months, the first six of which are 31days, the next five 30 days, and the final month 29days in a normal year and 30 days in a leap year.

As one of the few calendars designed in the era of accuratepositional astronomy, the Persian calendar uses a very complexleap year structure which makes it the most accurate solarcalendar in use today. Years are grouped into cycleswhich begin with four normal years after which every fourthsubsequent year in the cycle is a leap year. Cycles are groupedinto grand cycles of either 128 years (composed ofcycles of 29, 33, 33, and 33 years) or 132 years, containingcycles of of 29, 33, 33, and 37 years. A great grandcycle is composed of 21 consecutive 128 year grand cyclesand a final 132 grand cycle, for a total of 2820 years. Thepattern of normal and leap years which began in 1925 will notrepeat until the year 4745!

Each 2820 year great grand cycle contains 2137 normalyears of 365 days and 683 leap years of 366 days,with the average year length over the great grand cycleof 365.24219852. So close is this to the actualsolar tropical year of 365.24219878 days that thePersian calendar accumulates an error of one dayonly every 3.8 million years. As a purely solarcalendar, months are not synchronised with thephases of the Moon.

Mayan Calendars

The Mayans employed three calendars, all organised as hierarchiesof cycles of days of various lengths. The Long Count wasthe principal calendar for historical purposes, the Haabwas used as the civil calendar, while the Tzolkinwas the religious calendar. All of the Mayan calendarsare based on serial counting of days without means for synchronisingthe calendar to the Sun or Moon, although the Long Count and Haabcalendars contain cycles of 360 and 365 days, respectively, whichare roughly comparable to the solar year. Based purely on countingdays, the Long Count more closely resembles theJulian Day system and contemporary computer representations ofdate and time than other calendars devised in antiquity.Also distinctly modern in appearance is that days andcycles count from zero, not one as in most other calendars,which simplifies the computation of dates, and that numbersas opposed to names were used for all of the cycles.
CycleComposed ofTotal
Days
Years
(approx.)
kin1
uinal20 kin20
tun18 uinal3600.986
katun20 tun720019.7
baktun20 katun144,000394.3
pictun20 baktun2,880,0007,885
calabtun20 piktun57,600,000157,704
kinchiltun20 calabtun1,152,000,0003,154,071
alautun20 kinchiltun23,040,000,00063,081,429
The Long Count calendar is organised into thehierarchy of cycles shown at the right.Each of the cycles is composed of 20 of the nextshorter cycle with the exception of the tun,which consists of 18 uinal of 20 days each.This results in a tun of 360 days, which maintainsapproximate alignment with the solar year over modestintervals--the calendar comes undone from theSun 5 days every tun.

The Mayans believed at at the conclusion of eachpictun cycle of about 7,885 years the universe isdestroyed and re-created. Those with apocalypticinclinations will be relieved to observe that the presentcycle will not end until Columbus Day, October 12, 4772 inthe Gregorian calendar. Speaking of apocalyptic events,it's amusing to observe that the longest of the cycles inthe Mayan calendar, alautun, about 63 millionyears, is comparable to the 65 million years since theimpact which brought down the curtain on the dinosaurs--animpact which occurred near the Yucatan peninsula where,almost an alautun later, the Mayan civilisationflourished. If the universe is going to be destroyed andthe end of the current pictun, there's no point inwriting dates using the longer cycles, so we dispensewith them here.

Dates in the Long Count calendar are written, by convention,as:

baktun.katun.tun.uinal.kin

and thus resemble present-day Internet IP addresses!

For civil purposes the Mayans used the Haabcalendar in which the year was divided into 18 named periodsof 20 days each, followed by five Uayeb daysnot considered part of any period. Dates in thiscalendar are written as a day number (0 to 19 for regularperiods and 0 to 4 for the days of Uayeb) followedby the name of the period. This calendar has no concept ofyear numbers; it simply repeats at the end of the complete365 day cycle. Consequently, it is not possible, given adate in the Haab calendar, to determine the LongCount or year in other calendars. The 365 day cycleprovides better alignment with the solar year than the 360day tun of the Long Count but, lacking a leap yearmechanism, the Haab calendar shifted one day withrespect to the seasons about every four years.

The Mayan religion employed the Tzolkin calendar,composed of 20 named periods of 13 days. Unlike theHaab calendar, in which the day numbers incrementuntil the end of the period, at which time the next periodname is used and the day count reset to 0, the names and numbersin the Tzolkin calendar advance in parallel. On eachsuccessive day, the day number is incremented by 1, beingreset to 0 upon reaching 13, and the next in the cycle of twentynames is affixed to it. Since 13 does not evenly divide 20,there are thus a total of 260 day number and period names beforethe calendar repeats. As with the Haab calendar, cyclesare not counted and one cannot, therefore, convert a Tzolkindate into a unique date in other calendars. The 260 day cycleformed the basis for Mayan religious events and has no relationto the solar year or lunar month.

The Mayans frequently specified dates using both the Haaband Tzolkin calendars; dates of this form repeat onlyevery 52 solar years.

Bahá'í Calendar

The Bahá'í calendar is a solar calendar organised as ahierarchy of cycles, each of length 19, commemorating the 19year period between the 1844 proclamation of the Báb inShiraz andthe revelation by Bahá'u'lláh in 1863. Days are named in acycle of 19 names. Nineteen of these cycles of 19 days,usually called 'months' even though they have nothingwhatsoever to do with the Moon, make up a year, with aperiod between the 18th and 19th months referred to asAyyám-i-Há not considered part of any month; thisperiod is four days in normal years and five days in leapyears. The rule for leap years is identical to that of theGregorian calendar, so the Bahá'í calendar shares itsaccuracy and remains synchronised. The same cycle of 19names is used for days and months.

The year begins at the equinox, March 21, the Feast ofNaw-Rúz; days begin at sunset. Years have their owncycle of 19 names, called the Váhid. Successive cycles of19 years are numbered, with cycle 1 commencing on March 21, 1844,the year in which the Báb announced his prophecy.Cycles, in turn, are assembled into Kull-I-Shaysuper-cycles of 361 (19²) years. The first Kull-I-Shaywill not end until Gregorian calendar year 2205. A week of sevendays is superimposed on the calendar, with the week considered tobegin on Saturday. Confusingly, three of the names of weekdaysare identical to names in the 19 name cycles for days and months.

Indian Civil Calendar

Egyptian calendar converterA bewildering variety of calendars have been and continue to beused in the Indian subcontinent. In 1957 the Indiangovernment's Calendar Reform Committee adopted the NationalCalendar of India for civil purposes and, in addition,defined guidelines to standardise computation of thereligious calendar, which is based on astronomicalobservations. The civil calendar is used throughout Indiatoday for administrative purposes, but a variety ofreligious calendars remain in use. We present the civilcalendar here.

The National Calendar of India is composed of 12 months.The first month, Caitra, is 30 days in normaland 31 days in leap years. This is followed by fiveconsecutive 31 day months, then six 30 day months. Leapyears in the Indian calendar occur in the same years asas in the Gregorian calendar; the two calendars thushave identical accuracy and remain synchronised.

Years in the Indian calendar are counted from the start ofthe Saka Era, the equinox of March 22nd of year 79 in theGregorian calendar, designated day 1 of monthCaitra of year 1 in the Saka Era. The calendar wasofficially adopted on 1 Caitra, 1879 Saka Era, orMarch 22nd, 1957 Gregorian. Since year 1 of the Indiancalendar differs from year 1 of the Gregorian, todetermine whether a year in the Indian calendar is a leapyear, add 78 to the year of the Saka era thenapply the Gregorian calendar rule to the sum.

French Republican Calendar

The Calendar ConverterThe French Republican calendar was adopted by adecree of LaConvention Nationale on Gregorian date October 5, 1793and went into effect the following November 24th, on whichday Fabre d'Églantine proposed to the ConverterConventionthe names for the months. It incarnates the revolutionaryspirit of 'Out with the old! In with the relentlesslyrational!' which later gave rise in 1795 to the metricsystem of weights and measures which has proven more durablethan the Republican calendar.

The calendar consists of 12 months of 30 days each, followedby a five- or six-day holiday period, thejours complémentaires orsans-culottides. Months are grouped into fourseasons; the three months of each season end with the sameletters and rhyme with one another. The calendar begins onGregorian date September 22nd, 1792, the Septemberequinox and date of the founding of the First Republic.This day is designated the first day of the month ofVendémiaire in year 1 of the Republic. Subsequent yearsbegin on the day in which the September equinox occurs asreckoned at the Paris meridian. Days begin at true solarmidnight. Whether the sans-culottides periodcontains five or six days depends on the actualdate of the equinox. Consequently, there is no leap year ruleper se: 366 day years do not recur in a regularpattern but instead follow the dictates of astronomy. Thecalendar therefore stays perfectly aligned with the seasons.No attempt is made to synchronise months with the phases ofthe Moon.

The Republican calendar is rare in that it has noconcept of a seven day week. Each thirty day monthis divided into three décades of ten dayseach, the last of which, décadi, was theday of rest. (The word 'décade' mayconfuse English speakers; theFrench noun denoting ten years is 'décennie'.)The names of days in the décade are derived fromtheir number in the ten day sequence. The five orsix days of the sans-culottides do not bearthe names of the décade. Instead, each of these holidayscommemorates an aspect of the republican spirit.The last, jour de la Révolution, occurs onlyin years of 366 days.

Napoléon abolished the Republican calendar in favourof the Gregorian on January 1st, 1806. Thus France, oneof the first countries to adopt the Gregorian calendar(in December 1582), became the only country to subsequentlyabandon and then re-adopt it. During the period of theParis Commune uprising in 1871 the Republican calendarwas again briefly used.

The original decreewhich established the Republican calendar contained acontradiction: it defined the year as starting on the dayof the true autumnal equinox in Paris, but further prescribeda four year cycle called la Franciade, the fourthyear of which would end with le jour de la Révolutionand hence contain 366 days. These two specifications areincompatible, as 366 day years defined by the equinox donot recur on a regular four year schedule. This problem wasrecognised shortly after the calendar was proclaimed, but thecalendar was abandoned five years before the first conflictwould have occurred and the issue was never formally resolved. Herewe assume the equinox rule prevails, as a rigid four yearcycle would be no more accurate than the Julian calendar, whichcouldn't possibly be the intent of its enlightened Republicandesigners.

ISO-8601 Week and Day, and Day of Year

TheInternational Standards Organisation(ISO) issuedStandard ISO 8601, 'Representation of Dates' in 1988,superseding the earlier ISO 2015. The bulk of the standardconsists of standards for representing dates in theGregorian calendar including the highly recommended'YYYY-MM-DD' form which is unambiguous, free of culturalbias, can be sorted into order without rearrangement, and isY9K compliant. In addition, ISO 8601 formally defines the'calendar week' often encountered in commercial transactionsin Europe. The first calendar week of a year: week 1, isthat week which contains the first Thursday of the year (or,equivalently, the week which includes January 4th of theyear; the first day of that week is the previous Monday).The last week: week 52 or 53 depending on thedate of Monday in the first week, is that which containsDecember 31 of the year. The first ISO calendar week of agiven year starts with a Monday which can be as early asDecember 29th of the previous year or as late as January4th of the present; the last calendar week can end as lateas Sunday, January 3rd of the subsequent year.ISO 8601 dates in year, week, and day form are writtenwith a 'W' preceding the week number, which bears a leadingzero if less than 10, for example February 29th, 2000is written as 2000-02-29 in year, month, day format and2000-W09-2 in year, week, day form; since the day numbercan never exceed 7, only a single digit is required.The hyphens may be elided for brevity and the day numberomitted if not required. You will frequently see date ofmanufacture codes such as '00W09' stamped on products; thisis an abbreviation of 2000-W09, the ninth week of year 2000.

In solar calendars such as the Gregorian, only days andyears have physical significance: days are defined by therotation of the Earth, and years by its orbit about the Sun.Months, decoupled from the phases of the Moon, are but amemory of forgotten lunar calendars, while weeks of seven daysare entirely a social construct--while most calendars in usetoday adopt a cycle of seven day names or numbers, calendarswith name cycles ranging from four to sixty days have beenused by other cultures in history.

ISO 8601 permits us to jettison the historical and culturalbaggage of weeks and months and express a date simply bythe year and day number within that year, ranging from 001for January 1st through 365 (366 in a leap year) forDecember 31st. This format makes it easy to do arithmeticwith dates within a year, and only slightly more complicatedfor periods which span year boundaries. You'llsee this representation used in project planning and for specifying deliverydates. ISO dates in this form are written as 'YYYY-DDD',for example 2000-060 for February 29th, 2000; leading zeroesare always written in the day number, but the hyphen may beomitted for brevity.

All ISO 8601 date formats have the advantages of beingfixed length (at least until the Y10K crisis rolls around) and, whenstored in a computer, of being sorted in date orderby an alphanumeric sort of their textual representations.The ISO week and day and day of year calendars arederivative of the Gregorian calendar and share its accuracy.

You can download the ISO 8601standard from the ISO Web site; to read this PDF document you'llneed Adobe Acrobat Reader, which isavailable as afree downloadfrom Adobe's site.

Unix time() value

Development of the Unix operating system began at Bell Laboratoriesin 1969 by Dennis Ritchie and Ken Thompson, with the firstPDP-11 version becoming operational in February 1971. Unix wiselyadopted the convention that all internal dates and times (for example,the time of creation and last modification of files) were kept inUniversal Time, and converted to local time based on a per-usertime zone specification. This far-sighted choice has made itvastly easier to integrate Unix systems into far-flung networkswithout a chaos of conflicting time settings.

The machines on which Unix was developed and initially deployedcould not support arithmetic on integers longer than 32 bitswithout costly multiple-precision computation in software.The internal representation of time was therefore chosen to bethe number of seconds elapsed since00:00 Universal time on January 1, 1970 in the Gregoriancalendar (Julian day 2440587.5), with time stored as a 32bit signed integer (long in the original C implementation).

The influence of Unix time representation has spread wellbeyond Unix since most C and C++ libraries on other systemsprovide Unix-compatible time and date functions. The majordrawback of Unix time representation is that, if kept as a32 bit signed quantity, on January 19, 2038 it will gonegative, resulting in chaos in programs unprepared forthis. Modern Unix and C implementations define the resultof the time() function as type time_t,which leaves the door open for remediation (by changing thedefinition to a 64 bit integer, for example) before theclock ticks the dreaded doomsday second.

Excel Serial Day Number

Spreadsheet calculations frequently need to do arithmetic with dateand time quantities--for example, calculating the interest on a loanwith a given term. When Microsoft Excel was introduced for the PCWindows platform, it defined dates and times as 'serial values', whichexpress dates and times as the number of days elapsed since midnighton January 1, 1900 with time given as a fraction of a day. Midnighton January 1, 1900 is day 1.0 in this scheme. Time zone isunspecified in Excel dates, with the NOW() function returningwhatever the computer's clock is set to--in most cases local time, sowhen combining data from machines in different time zones you usuallyneed to add or subtract the bias, which can differ over the year dueto observance of summer time. Here we assume Excel dates representUniversal (Greenwich Mean) time, since there isn't any other rationalchoice. But don't assume you can always get away with this.

You'd be entitled to think, therefore, that conversion back andforth between PC Excel serial values and Julian day numbers wouldsimply be a matter of adding or subtracting the Julian day numberof December 31, 1899 (since the PC Excel days are numbered from 1).But this is a Microsoft calendar, remember, so one mustfirst look to make sure it doesn't contain one of those boneheadblunders characteristic of Microsoft. As is usually the case,one doesn't have to look very far. If you have a copy of PCExcel, fire it up, format a cell as containing a date, andtype 60 into it: out pops 'February 29, 1900'. News apparentlytravels very slowly from Rome to Redmond--ever sincePope Gregory revised the calendar in 1582, years divisibleby 100 have not been leap years, and consequently theyear 1900 contained no February 29th. Due to this morsel ofinformation having been lost somewhere between the Holy See andthe Infernal Seattle monopoly,all Excel day numbers for days subsequent to February 28th, 1900are one day greater than the actual day count from January 1, 1900.Further, note that any computation of the number of days ina period which begins in January or February 1900 and ends in asubsequent month will be off by one--the day count will be onegreater than the actual number of days elapsed.

By the time the 1900 blunder was discovered, Excel users hadcreated millions of spreadsheets containing incorrectday numbers, so Microsoft decided to leave the error in placerather than force users to convert their spreadsheets, and theerror remains to this day. Note, however, that only 1900is affected; while the first release of Excel probably alsoscrewed up all years divisible by 100 and hence implemented apurely Julian calendar, contemporary versions do correctlycount days in 2000 (which is a leap year, being divisible by400), 2100, and subsequent end of century years.

PC Excel day numbers are valid only between 1 (January 1, 1900) and2958465 (December 31, 9999). Although a serial day counting schemehas no difficulty coping with arbitrary date ranges or days beforethe start of the epoch (given sufficient precision in the representationof numbers), Excel doesn't do so. Day 0 is deemed the idioticJanuary 0, 1900 (at least in Excel 97), and negative days andthose in Y10K and beyond are not handled at all. Further, oldversions of Excel did date arithmetic using 16 bit quantitiesand did not support day numbers greater than 65380 (December31, 2078); I do not know in which release of Excel this limitation was remedied.
Having saddled every PC Excel user with a defective datenumbering scheme wasn't enough for Microsoft--nothing ever is.Next, they proceeded to come out with a Macintosh versionof Excel which uses an entirely different day numberingsystem based on the MacOS native time format which countsseconds elapsed since January 1, 1904. To further obfuscatematters, on the Macintosh they chose to number days from zerorather than 1, so midnight on January 1, 1904 has serialvalue 0.0. By starting in 1904, they avoided screwing up 1900as they did on the PC. So now Excel users who interchange datahave to cope with two incompatible schemes for counting days, oneof which thinks 1900 was a leap year and the other whichdoesn't go back that far. To compound the fun, you can nowselect either date system on either platform, so you can't becertain dates are compatible even when receiving data fromanother user with same kind of machine you're using. I'msure this was all done in the interest of the 'efficiency'of which Microsoft is so fond. As we all know, it would take a computeralmost forever to add or subtract four in order to make everythingseamlessly interchangeable.

Macintosh Excel day numbers are valid only between 0(January 1, 1904) and 2957003 (December 31, 9999). Althougha serial day counting scheme has no difficulty coping witharbitrary date ranges or days before the start of the epoch(given sufficient precision in the representation ofnumbers), Excel doesn't do so. Negative days and those inY10K and beyond are not handled at all. Further, oldversions of Excel did date arithmetic using 16 bitquantities and did not support day numbers greater than63918 (December 31, 2078); I do not know in which release ofExcel this limitation was remedied.

References

Click on titles to order books on-line from
Meeus, Jean.Astronomical Algorithms. Richmond: Willmann-Bell,1991. ISBN 0-943396-35-2.
The essential reference for computational positionalastronomy.
P. Kenneth Seidelmann (ed.)Explanatory Supplement to the Astronomical Almanac . Sausalito CA: University Science Books,1992. ISBN 0-935702-68-7.

The Calendar Converter Calculator

Authoritative reference on a wealth of topics related to computational geodesy and astronomy. Various calendars are described in depth, including techniques for interconversion.
The Institut de mécanique céleste et de calcul des éphémérides in Paris provides excellent on-line descriptions of a variety of calendars.
by John Walker

The Calendar Converter Online

November, MM

Julian Calendar Converter

This document is in the public domain.




Coments are closed