## ## 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;

In reply to Date::Language::Danish by Mr. Muskrat

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.