Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Lady /DATE

by Steeeeeve (Initiate)
on Feb 02, 2001 at 13:24 UTC ( [id://55969]=note: print w/replies, xml ) Need Help??


in reply to Re: Lady /DATE
in thread Lady /DATE

No,, The date today should be 20010331801.

2001 033 rd day of the year and 1801 for 601 pm (If its that time of course.)

Julian system counts the days of the solar year. 1 to 365. Its theoretically prudent to precompute the Julian date for making fast comparisons later. Just my theory. Also can quickly add and subtract quantities of time using this format.

Lady was my diabetic Golden Retriever. I dedicated lots of my early Perl to her.

-Steeeeeve

Replies are listed 'Best First'.
Re: Re: Re: Lady /DATE
by a (Friar) on Feb 03, 2001 at 12:29 UTC
    okay:
    while ($__month >= 0){ $days = $days + $monthdays[$__month]; --$__month; }
    for "2/1" $__month is 2, you'll add 28 + 31 + 1 and get '60'.
    So my fix didn't work so well. Either knock one off the month to start w/ or put "0" at the beginning of the month array so that $__month == 0 adds zero, not 31. i.e.
    @monthdays = ("0", "31","28","31","30","31","30","31","31","30","31"," +30","31"); my $days = 0; while (--$__month >= $[){ $days = $days + $monthdays[$__month]; #--$__month; } $days = $days + $__day;
    while (--$__month >= 0 )

    a

      /me wonders if either of you are aware that all of these versions of get_days_since_new_year will be broken in about a month anyway.
        Oh, nobody counts the days_since_new_year's_hangover that closely anyway ... ;->

        a

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55969]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-03-28 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found