Skip to content

ntyni/Time-Piece

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time::Piece
===========

This module supercedes Time::Object (and has a better name).

At this time the module is almost identical to Time::Object, with
the exception of strptime support. People using Time::Object should
migrate over to Time::Piece as they are able to do so. No further
development will occur to Time::Object.

DESCRIPTION

Have you ever thought you time was thoroughly wasted by doing:

  $ perldoc -f localtime

just to recall the position of wday or some other item in the returned
list of values from localtime (or gmtime) ?

Well Time::Piece is the answer to your prayers.

Time::Piece does the right thing with the return value from localtime:

  - in list context it returns a list of values

  - in scalar context it returns a Time::Piece object

  - when stringified (or printed), Time::Piece objects look like
    the output from scalar(localtime)

Beyond that, Time::Piece objects allow you to get any part of the
date/time via method calls, plus they allow you to get at the string
form of the week day and month. It has methods for julian days, and
some simple date arithmetic options.

Time::Piece also gives you easy access to your C library's strftime
and strptime functions, so you can parse and output locale sensitive
dates to your heart's content :-)

About

Object Oriented time objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 40.9%
  • XS 39.3%
  • Other 19.8%