| Category: | Date / Time |
| Author/Contact Info | /msg Mr. Muskrat |
| Description: | Another Date::Language module. I need some help! I do not know if you can get the short month names just using the first three letters. I also do not understand the Danish ordinals. I have not found the equivilents of AM or PM. |
##
## Danish tables
##
package Date::Language::Danish;
use Date::Language ();
use vars qw(@ISA @DoW @DoWs @MoY @MoYs @AMPM %MoY %DoW $VERSION);
@ISA = qw(Date::Language);
$VERSION = "1.00";
@DoW = qw(Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag);
@MoY = qw(Januar Februar Marts April Må Juni Juli August September Okt
+ober November December);
@DoWs = map { substr($_,0,3) } @DoW;
# Is this correct for Danish?
@MoYs = map { substr($_,0,3) } @MoY;
# Your guess is as good as mine...
@AMPM = qw(AM PM);
# Ordinals look very complicated in Danish
#@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
#@Dsuf[11,12,13] = qw(th th th);
#@Dsuf[30,31] = qw(th st);
@MoY{@MoY} = (0 .. scalar(@MoY));
@MoY{@MoYs} = (0 .. scalar(@MoYs));
@DoW{@DoW} = (0 .. scalar(@DoW));
@DoW{@DoWs} = (0 .. scalar(@DoWs));
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
|
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Language::Danish
by Mr. Muskrat (Canon) on Oct 29, 2002 at 20:44 UTC | |
|
Re: Date::Language::Danish
by Mr. Muskrat (Canon) on Nov 04, 2002 at 16:15 UTC |