in reply to The Perl Review's Date Format Challenge
First there's Swatch time (Beat Time) which gives 1000 beats to each day. See Time::Beat or DateTime::Format::IBeat. IBeat has a way to parse dates as well, so one of these must be right.
The answer to the last one is something between @084 and @085. So depending on your opinion, using the Beat calendar gives us alternate dates of Feb. 1, 2003 and May 4, 2006. Well, this seems to depend either on a European vs. American ordering of month and day, or on Swatch's choice of writing the date before the time.@d01.02.03 @456 Beat Time is 2003-02-01T09:56:38 Gregorian. @d04.05.06 @123 Beat Time is 2006-05-04T01:57:07 Gregorian. @d04.05.06 @085 Beat Time is 2006-05-04T01:02:24 Gregorian.
The key is to know that in Japan, many people will now read it as a date 12 years ago and not 2006 (which is Heisei 18). People usually write out 2006 I think, whereas the year 6 would be "Heisei 6" (6th year of the reign of the Heisei Emperor). I will not cause bad luck and tell you how someone born 12 years ago can experience that date three times. But I can say that lots of Japanese have experienced the date already three times, thanks to the "greying of Japan". The previous emperor was Emperor Showa, whose reign began in 1925. So Showa 6 was 1931. So anybody over 75 years old (and there are a *lot* of them here) lived through both Showa 6 and Heisei 6, plus 2006 of course. I tried the modern Japanese calendar module but had trouble pasting the Japanese output from a non-Japanese terminal session (maybe it can be done but..) So, Tatsuhiko Miyagawa's Date::Japanese::Era to the rescue.
use Date::Japanese::Era; my $era = Date::Japanese::Era->new(2006, 4, 5); print "2006 is " . uc($era->name_ascii) . " " . $era->year . "\n"; for my $Emperor (qw(heisei taishou meiji)) { $era = Date::Japanese::Era->new($Emperor, 6); print uc($Emperor) . " 6 is " . $era->gregorian_year . "\n"; } 2006 is HEISEI 18 HEISEI 6 is 1994 TAISHOU 6 is 1917 MEIJI 6 is 1873
use Locale::Hebrew::Calendar; my ($dd,$mm,$yy) = ("04","05","-1806"); # Gregorian to Jewish my ($d, $m, $y) = Locale::Hebrew::Calendar::g2j($dd, $mm, $yy); print "G2J: $d/$m/$y\n"; $perl hebrewcal.pl G2J: 11/7/1954
If this meets your approval I'd like Damian's Practices or MJD's new book instead! :)
|
|---|