Main > Programming > Libraries >

Time::Piece 1.11

Time::Piece 1.11

Sponsored Links

Time::Piece 1.11 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.020 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 797
Date added: 2007-08-21

Time::Piece 1.11 description

Time::Piece is a Perl module that contains Object Oriented time objects.

SYNOPSIS

use Time::Piece;

my $t = localtime;
print "Time is $tn";
print "Year is ", $t->year, "n";

This module replaces the standard localtime and gmtime functions with implementations that return objects. It does so in a backwards compatible manner, so that using localtime/gmtime in the way documented in perlfunc will still return what you expect.

The module actually implements most of an interface described by Larry Wall on the perl5-porters mailing list here: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg00241.html

USAGE

After importing this module, when you use localtime or gmtime in a scalar context, rather than getting an ordinary scalar string representing the date and time, you get a Time::Piece object, whose stringification happens to produce the same effect as the localtime and gmtime functions. There is also a new() constructor provided, which is the same as localtime(), except when passed a Time::Piece object, in which case its a copy constructor. The following methods are available on the object:

$t->sec # also available as $t->second
$t->min # also available as $t->minute
$t->hour # 24 hour
$t->mday # also available as $t->day_of_month
$t->mon # 1 = January
$t->_mon # 0 = January
$t->monname # Feb
$t->month # same as $t->monname
$t->fullmonth # February
$t->year # based at 0 (year 0 AD is, of course 1 BC)
$t->_year # year minus 1900
$t->yy # 2 digit year
$t->wday # 1 = Sunday
$t->_wday # 0 = Sunday
$t->day_of_week # 0 = Sunday
$t->wdayname # Tue
$t->day # same as wdayname
$t->fullday # Tuesday
$t->yday # also available as $t->day_of_year, 0 = Jan 01
$t->isdst # also available as $t->daylight_savings

$t->hms # 12:34:56
$t->hms(".") # 12.34.56
$t->time # same as $t->hms

$t->ymd # 2000-02-29
$t->date # same as $t->ymd
$t->mdy # 02-29-2000
$t->mdy("/") # 02/29/2000
$t->dmy # 29-02-2000
$t->dmy(".") # 29.02.2000
$t->datetime # 2000-02-29T12:34:56 (ISO 8601)
$t->cdate # Tue Feb 29 12:34:56 2000
"$t" # same as $t->cdate

$t->epoch # seconds since the epoch
$t->tzoffset # timezone offset in a Time::Seconds object

$t->julian_day # number of days since Julian period began
$t->mjd # modified Julian date (JD-2400000.5 days)

$t->week # week number (ISO 8601)

$t->is_leap_year # true if it its
$t->month_last_day # 28-31

$t->time_separator($s) # set the default separator (default ":")
$t->date_separator($s) # set the default separator (default "-")
$t->day_list(@days) # set the default weekdays
$t->mon_list(@days) # set the default months

$t->strftime(FORMAT) # same as POSIX::strftime (without the overhead
# of the full POSIX extension)
$t->strftime() # "Tue, 29 Feb 2000 12:34:56 GMT"

Time::Piece->strptime(STRING, FORMAT)
# see strptime man page. Creates a new
# Time::Piece object

Time::Piece 1.11 Screenshot

Advertisements

Time::Piece 1.11 Keywords

Bookmark Time::Piece 1.11

Hyperlink code:
Link for forum:

Time::Piece 1.11 Copyright

WareSeeker periodically updates pricing and software information of Time::Piece 1.11 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Time::Piece 1.11 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
DateTime::Precise can perform common time and date operations with additional GPS operations. Free Download
Games::Object is a Perl module to provide a base class for game objects. Free Download
AtExit is a Perl module that can perform exit processing for a program or object. Free Download
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. Free Download
apercu is a command-line application to summarize information from Apache logs. Free Download
Mica is a networked and persistent Object-Oriented programming language. Free Download
DateTime is a date and time object. Free Download
Myco is a Perl module that contains the myco object framework. Free Download