On 1/4/03 9:34 am, Daisuke Maki at [EMAIL PROTECTED] spake thus:
> I just subscribed to this list after seeing the article in use.perl.org.
> I apologize if this topic has been discussed before...

Archives are available at http://nntp.perl.org/ but it hasn't been discussed
before. Thanks for joining us, its always good to get more and more
perspectives.

Just when you think that something is finished, someone new (with authority)
will point out an assumption that was wrong, only no-one around knew it.

When I started DateTime::Event::Easter I thought Orthodox Easter would only
ever be one or two weeks away from Western Easter. Then someone with an
Orthodox background popped up and I had to rethink everything! Its one of
the great things about community development!

> Then I noticed that DateTime::Language only has attributes for month
> names, day names, and am/pm. What about time representation? And also,
> there's the suffix characters that one might use in Japanese..

It looks to me like this is an ideal candidate for a
DateTime::Format::Japanese module. The 'format' modules take a DateTime
object and return them in a given format or take a string in the format and
return a DateTime object.

For your puposes this would be very easy:

sub format_datetime {
    $dt = shift;
    return sprintf("%s%s%s%s%s%s %s%s%s%s%s%s",
        japanese_number($dt->year),
        'japanese_for_year',
        japanese_number($dt->month),
        'japanese_for_month',
        japanese_number($dt->day),
        'japanese_for_day',

        japanese_number($dt->hour),
        'japanese_for_hour',
        japanese_number($dt->minute),
        'japanese_for_minute',
        japanese_number($dt->second),
        'japanese_for_second',
    );
}

Basically, my reason for thinking this is a ::format rather than a
::language issue is that there are very few instances where the
representations of numerals is not the hindu-arabic forms. To put numerals
into ::Language modules would mean the overhead of 'translating' each
numeral whenever its output.

Once again, welcome to the list and the world of standardized Date and Time
module development.

Cheers!
Rick Measham


--------------------------------------------------------
�� � � � � � There are 10 kinds of people:
�� those that understand binary, and those that don't.
--------------------------------------------------------
�� The day Microsoft makes something that doesn't suck
�� � is the day they start selling vacuum cleaners
--------------------------------------------------------


Reply via email to