David Pogue has a momentary lapse of judgement when he proclaims in his blog that the date sequence 01:02:03 04/05/06 will only happen once in all of human history.

Besides the obvious gaffes of date formatting (which one is the month and which one is the year?), the red herring of leading zeros (to make the minute and second stand out), and so on, no one who's seen this has made the comment that calendars say whatever we want them to say and the numbers are only special because we set the calendar up that way in this one case. What about the Chinese, Hebrew, and Muslim calendars?

So this seems like a good challenge to publish in The Perl Review: using the Perl Date modules (or not, I guess), in how many different calendars and formats can you make this sequence? What else is special about those days (are they a weekend, fall on a full moon, have a solar eclipse, etc.)?

I have a few restrictions though: in the chosen calendar, the date and time has to have actually occurred and been observed by society at large (so dates missed by the likes of daylight savings, leap seconds, skipped weeks, and so on don't count). The date format has to be something reasonable and understandable to a majority of people, techies or otherwise (so "YY hh dd ss" sort of formats are out, unless that's how most people format dates for that time (and the US military has a DDHHMMmmmYYYY format, for instance)). The epoch times of 1234567890 won't get points.

I'm especially interested in solutions that will show that a large majority of the population of the planet will live through two such events in their normal lifespan, for instance, once in the normal English date format and once in the Hebrew calendar.

The scoring is up to me and a secret panel of judges, and I'll select valid entries from replies to this post (so offshoot threads in Obfuscated Code, although you have to let me know somehow that their there).

I'll give bonus points to anyone who then gets David Pogue to show their solution (not necessarily the code) as a correction to his post, and double bonus points if he mentions Perl. I'll assign points on code beauty, cleverness, and understandability, with maybe a special category for obfuscation.

That must be worth at least a free copy of Learning Perl and Intermediate Perl, and some free subscriptions to The Perl Review (to anywhere in the world the US Post Office will send things). The number of prizes will not be less than three, but are maximally unbound.

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

In reply to The Perl Review's Date Format Challenge by brian_d_foy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.