>On Tue, 14 Jan 2003, Matthew Simon Cavalletto wrote:
>
>> OK, that'll let us parse a Discordian date and format it as a
>> Gregorian; I assume that to print something in Discordian format we'd
>> use:
>>
>> my $disc = DateTime::Calendar::Discordian->new( object => $dt );
>> print $disc->strftime( ... )
>>
>> I'm concerned that this approach may end up requiring that
>> DateTime::Calendar::Discordian to be a subclass of DateTime, and I know
>> you've recently argued that calendars that aren't Gregorian shouldn't
>> be subclasses of DateTime due to API confusion issues.
>
>You seem to be assuming that other calendars are likely to be able to take
>advantage of DateTime.pm methods like strftime() or hour(). I am assuming
>that this won't be the case.
>
>But I'm not a calendar author. Rich, Abigail, Jean? What do you think.
>
Because I took Mordechai Abzug's API, I wrote a "date_string" method. I
just added an optional parameter: a string containing such things as
"%y", "%d" etc. So, my enhanced "date_string" method actually *is*
strftime with another name.
I could do this because the French_Rev calendar has concepts that
are similar to the Gregorian calendar it was meant to replace.
So, instead of a week number we have a d�cade number, instead
of a day of week (Mon, Tue...) we have a day of d�cade (Pri, Duo...).
But a Discordian and a Mayan would tell you different things...
By the way, answering another of your messages:
> Who needs %E* and %O* modifiers?
I need them. The traditional way to write a FR year is to use Roman
numerals. So, while %Y gives you the Indian-Arabian numerals (2003),
%EY gives you the Roman numerals (MMIII). At the same time, while
%j gives you the 1..366 number of a day, %Ej gives you the designation
of the day (which was meant to replace the saint of the day).
Example, from my .profile:
print $day->date_string("Today is %A %d %B %EY, %Ej%n");
gave me a few minutes ago:
Today is Sextidi 26 Niv�se CCXI, jour de l'�tain
Jean
--
WYGIWYGAINGW = "What You Get Is What You're Given And It's
No Good Whining."
Archichancelier Mustrum Ridcully
(cit� par Terry Prachett dans The Science of Discworld)