E
Eric J. Roode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[This is somewhat of a repost of an article I posted three months
ago.
I have received almost no feedback on this module, which means a)
It's perfect the way it is; b) Nobody uses it because it stinks; or
c) Nobody uses it because nobody knows about it. I am posting this
in case the latter is true. Feel free to comment. Or heck, feel
free to continue to ignore it.
]
Time::Format v0.13 has been released. If no features are added or
bugs are fixed by Feb 1, 2004, it will be re-released as v1.0.
Time::Format is designed to be an easy-to-use time and date
formatting utility module. The format codes follow a simple pattern
and are meant to be easy to use and easy to remember. If I've done
my job well, you probably won't ever need to refer to the
documentation to look up a code, once you've learned the system. It
provides most of the functionality of POSIX::strftime (plus some
things POSIX::strftime does not provide), without annoying and
hard-to-remember % codes. (For example, I can never remember whether
%A is the weekday name and %B is the month name, or vice-versa).
In addition to a function-call interface, Time::Format also provides
a tied-hash interface, which makes formatting dates within strings
vastly easier. Some examples:
print "Today is $time{'yyyy/mm/dd'}\n";
print "Yesterday was $time{'yyyy/mm/dd', time-24*60*60}\n";
print "The time is $time{'hh:mm:ss'}\n";
print "Another time is $time{'H:mm am tz', $another_time}\n";
print "Timestamp: $time{'yyyymmdd.hhmmss.mmm'}\n";
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE/183FY96i4h5M0egRAp3VAKDhexZoR0R7276AIIuHl0wdpjzMEQCfWZZi
ORiEew60dNVVZf7T1Db1J/I=
=iTQy
-----END PGP SIGNATURE-----
Hash: SHA1
[This is somewhat of a repost of an article I posted three months
ago.
I have received almost no feedback on this module, which means a)
It's perfect the way it is; b) Nobody uses it because it stinks; or
c) Nobody uses it because nobody knows about it. I am posting this
in case the latter is true. Feel free to comment. Or heck, feel
free to continue to ignore it.
Time::Format v0.13 has been released. If no features are added or
bugs are fixed by Feb 1, 2004, it will be re-released as v1.0.
Time::Format is designed to be an easy-to-use time and date
formatting utility module. The format codes follow a simple pattern
and are meant to be easy to use and easy to remember. If I've done
my job well, you probably won't ever need to refer to the
documentation to look up a code, once you've learned the system. It
provides most of the functionality of POSIX::strftime (plus some
things POSIX::strftime does not provide), without annoying and
hard-to-remember % codes. (For example, I can never remember whether
%A is the weekday name and %B is the month name, or vice-versa).
In addition to a function-call interface, Time::Format also provides
a tied-hash interface, which makes formatting dates within strings
vastly easier. Some examples:
print "Today is $time{'yyyy/mm/dd'}\n";
print "Yesterday was $time{'yyyy/mm/dd', time-24*60*60}\n";
print "The time is $time{'hh:mm:ss'}\n";
print "Another time is $time{'H:mm am tz', $another_time}\n";
print "Timestamp: $time{'yyyymmdd.hhmmss.mmm'}\n";
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE/183FY96i4h5M0egRAp3VAKDhexZoR0R7276AIIuHl0wdpjzMEQCfWZZi
ORiEew60dNVVZf7T1Db1J/I=
=iTQy
-----END PGP SIGNATURE-----