|
Posted by Eric J. Roode on December 8, 2005, 6:20 am
Please log in for more thread options
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greetings, Perl Community.
I am pleased to post a new module, Regexp::Common::time, to
CPAN.
This is a plug-in module for Regexp::Common. It provides
out-of-the-box regular expressions for parsing most common date/time
formats, including most ISO-8601 style date/time strings. Even
better, it allows you to build arbitrarily complex date/time
patterns from strftime's "%" formats, or from Time::Format's
mnemonic formats. It is also locale-aware. (thus, it can match
month and day names in the language appropriate for the current
locale).
This module is part of a trio of modules for handling conversion
of date data to and from string representations. Time::Format
makes it easy to convert dates/times into formatted strings;
Regexp::Common::time aids in reading date/time strings; and
Time::Normalize takes the date/time components (from
Regexp::Common::time, for example), checks them for errors, and
transforms them into a standardized representation so you don't
have to.
These modules don't do computations or other date/time
manipulations; there are excellent modules already on CPAN that do
that. These modules are for formatted I/O of date/time data... in
just about every imagineable manner.
Regexp::Common::time is a new module, so of course use it with
caution. Still, it has a test suite with over 7000 tests in it.
It is reasonably fast, too; the test suite runs in 4 seconds on my
creaky old home computer. But since it is new and hasn't been
extensively battle-hardened, there may be surprises lurking beneath
the surface. Bug reports are welcome.
I have high hopes for this module. May it be useful to you.
- --
Eric J. Roode
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$$,$:$%[$?]",$"&$~,$#,);$,++
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32) - WinPT 0.7.96rc1
iD8DBQFDmCV4Y96i4h5M0egRAsFqAJ0eFFCM/PlPBpgVhjLitJPaKEQPcQCg+nMG
MXCDiYxeqgfNGQTSJTApODo=
=lUSH
-----END PGP SIGNATURE-----
|
| Similar Threads | Posted | | XML::LibXML::Common does not install Common.pm | November 27, 2007, 11:21 pm |
| ANNOUNCE: Time::Out 0.01 | January 4, 2005, 11:30 pm |
| subdomain.domain.tld regexp? | March 24, 2005, 6:58 am |
| Module Submission: Regexp::MultiLanguage | June 22, 2006, 1:53 pm |
| HTTP::Request::Common::POST and UTF-8 | September 27, 2005, 12:21 pm |
| troubles with HTTP::Request::Common | March 8, 2005, 11:42 pm |
| Modules for hash functions? (ie, common algorithms for computing hash keys, not manipulating perl hashes) | August 26, 2006, 7:08 pm |
| Writing row at a time in Excel using OLE | June 14, 2007, 1:43 pm |
| Reduce CPU time while using serialport? | September 6, 2007, 4:18 pm |
| Time::Local - month problem | December 15, 2004, 11:28 am |
|