Segfault has asked for the wisdom of the Perl Monks concerning the following question:
If I wanted to find out what day of the year it is, how would I do that in Perl? I know I could easily just do a `date +%j` or something, but I'm curious how it could be done with the language itself in a manner that's OS-independent.
Also, if I wanted to find out how many days there are between two dates, how might I go about doing it? For example, if I wanted to calculate how many days there are between now and June 17th of 2003, how could it be done?
Thanks for any suggestions :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Date Calculation
by Enlil (Parson) on Nov 08, 2002 at 22:20 UTC | |
Re: Date Calculation
by gjb (Vicar) on Nov 08, 2002 at 22:14 UTC | |
Re: Date Calculation
by tadman (Prior) on Nov 08, 2002 at 22:59 UTC | |
Re: Date Calculation
by VSarkiss (Monsignor) on Nov 08, 2002 at 22:24 UTC | |
Re: Date Calculation
by Segfault (Scribe) on Nov 09, 2002 at 02:49 UTC | |
Re: Date Calculation
by jjdraco (Scribe) on Nov 08, 2002 at 22:23 UTC |