I know its not what you asked for .. you're looking at localtime methods, but I'll contribute the following just for interests sake:

This method will take a day, month and year and tell you what day of the week it was/is/will be.

I know this doesn't make sense to the human eye, but believe me, its an official algorithm for calculating the day of the week. I've just taken the algorithm and turned it into a perl version. If you want more info, search google for something like http://www.google.com/search?q=calculate+the+day+of+the+week

sub dow { ($year, $month, $day) = @_; $year-- if $month < 3; return ($year+int($year/4)-int($year/100)+int($year/400)+((0,3,2,5 +,0,3,5,1,4,6,2,4)[$month-1])+$day) % 7; } print (('Sun','Mon','Tues','Wed','Thu','Fri','Sat')[dow(2002,07,12)]);
As with localtime, the algorithm returns a number that relates to the day of the week. By using the return as the index to an anonymous array, we get the actual day.

In reply to Re: Finding the Day of Week in Windows by BigLug
in thread Finding the Day of Week in Windows by dru145

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.