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

[MacPerl] Munging dates



I spent part of the weekend trying to identify a suitable routine to
use under MacPerl to parse human-readable dates and turn them into
something that Perl can process. From CPAN I found what looks like
three candindtes:

  Date::Parse from a group of routines by Graham Barr. Appears to 
  work OK, but can only handle American style dates (1/2/1998 is 
  2nd January rather than 1st February) which is a problem for me.

  Time::ParseDate from a group of routines by Muir Sharnoff. Handles
  UK dates, but returns seconds since 1 Jan 1970, rather than from
  the normal Mac origin of 1 Jan 1907. I thought I could see how
  to fix this, but the routines use integer arrithmatic and the 'fix'
  seems to cause integer limits to be broken inside the code.

  Date::Manip by Sullivan Beck. I haven't looked at this in detail, 
  but it seems to be more complex than I need, and has the added
  drawback of returning a text string date rather than seconds
  since epoc.

Given this state of affairs, has anyone any suggestions as to how to 
procede or of better routines to try?

Jon.
--
Jon Warbrick, Computer Systems Manager,                jw35@cus.cam.ac.uk
St John's College, Cambridge, CB2 1TP, UK.             +44 (0)1223 338751
(also webmaster, computer-support and part-time postmaster@joh.cam.ac.uk)

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