4 This module supercedes Time::Object (and has a better name).
6 At this time the module is almost identical to Time::Object, with
7 the exception of strptime support. People using Time::Object should
8 migrate over to Time::Piece as they are able to do so. No further
9 development will occur to Time::Object.
13 Have you ever thought you time was thoroughly wasted by doing:
15 $ perldoc -f localtime
17 just to recall the position of wday or some other item in the returned
18 list of values from localtime (or gmtime) ?
20 Well Time::Piece is the answer to your prayers.
22 Time::Piece does the right thing with the return value from localtime:
24 - in list context it returns a list of values
26 - in scalar context it returns a Time::Piece object
28 - when stringified (or printed), Time::Piece objects look like
29 the output from scalar(localtime)
31 Beyond that, Time::Piece objects allow you to get any part of the
32 date/time via method calls, plus they allow you to get at the string
33 form of the week day and month. It has methods for julian days, and
34 some simple date arithmetic options.
36 Time::Piece also gives you easy access to your C library's strftime
37 and strptime functions, so you can parse and output locale sensitive
38 dates to your heart's content :-)