[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Perl date comparisons




I know that 'time()' returns the number of elapsed seconds between   
01-01-1970 and the instant the function is called.  If however, one   
wanted to compare two points in time in Perl, it would appear to me that   
Perl would need to provide the following function:

   elapsed_seconds_between_01-01-70_and_user_specified_date/time('yyyy-mm-  
dd hh:mm:ss');

Unless this function exists, how would one accurately perform the   
comparison?  I've tried to call 'time()' passing in dates, but nothing   
seems to happen, and I can not find any documentation indicating what   
type of parameter, if any, 'time' accepts.

Yes, I realize I could 'hack' at this function myself.  But there are   
probably enough special rules (ie; leap years - unless evenly divided by   
100, daylight savings, etc...) that I would not be knowledgeable about -   
that my seconds surely would not match the seconds returned by 'time()'.   
 Any help would be appreciated.  


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch