HTML provides a time element in order to mark date and time expressions in natural language. A machine readable format of this expression can be given by an attribute named datetime. The coding looks like this:
The current HTML 5 spec tells us that only precise calendar or 24 hour clock values are allowed, but the HTML 5.1 draft extends it pretty much: month strings, yearless date strings, week strings, time strings without date and duration strings shoud be allowed.
The datetime attribute allows for proleptic Gregorian dates only (the 5.1 draft skips this). Proleptic means that a year 0 exists since this simplifies calendar math. The purpose of my script is to provide access to calendars from CPAN, a code respository for Perl programmers, in order to calculate machine readable expressions for all available calendars. Time can only get processed if the module provides an interface to a 24 hour clock – a few of those based on the DateTime class do. Day counting modules take the time via the fractional part.
And finally a crucial warning: Please take care that all your inputs build a legal date in the referring calendar. Not all modules are save from nonsens values like 30. February in the Gregorian and throw an error! If that or simply nothing happens, the date was illegal or the module is out of range. Furthermore not all modules are speed optimized and will noticeably delay with dates far away from their real use.
Clicking the links will lead you to the module's documentation on CPAN, which is sometimes pretty sloppy. I had to browse the code frequently.
We use the Date::Roman module merely not as calendar of its own but as formatter only. The documentation says that the shift from Julian to Gregorian calendar is implemeted but I cannot see that this has an effect for conversion from Roman to Christian. That's why I simply ask for it. The irregular leap years between 45 BC (709 AUC) and 7 AD (760 AUC) are not implemented and years ante urba condita are not allowed.
Republican (French revolutionary)
Africa and Near East
Saka (Indian national)
Tamil (Hindu solar)
DateTime::Calendar::ShalivahanaShaka::Southern module. This module shows remarkable delays and it failed to install on a Windows computer. I am a bit puzzled about that since it shares most of its code with the HalariSamvata and VikramaSamvata::Gujarati modules which never caused any problems to me. If I observe too much server load I have to switch it off.
Vikrama Samvata (Gujarati)
Far East and America
Employs Calendar::Any::Chinese. Minimum date is 59th year of cycle 44.
Sorry, I cannot provide it since DateTime::Calendar::Japanese failed to install on my server.
Maya (long count)
Julian Day number
DateTime::Format::Epoch::JD module; not to interfere with the Julian calendar. It is the usual format in astronomy.
Modified Julian Day number
Reduced Julian Day number
Truncated Julian Day number
DateTime::Format::Epoch::Lilian module; named after Italian scientist Aloisius Lilius (–) who prepared the Gregorian reform but introduced by IBM and counts the days since .
1Richard Graham: Mapping Time: The Calendar and Its History. Oxford, New York (Oxford University Press) , ISBN 0192862057.
2Nachum Dershowitz, Edward M. Reingold: Calendrical Calculations. Cambridge, New York, Melbourne (Cambridge University Press), 3rd edition: , ISBN 9780521885409.