NAME
Net::Lyskom::Time - object that holds a time value.
SYNOPSIS
print scalar localtime($obj->time_t);
DESCRIPTION
All methods except time_t() and new() are get/set attribute accessors. That is, they return the attribute's contents if called without an argument and set the attribute's contents if given an argument. time_t() returns the held time in seconds since the Unix epoch, and new() creates a new object.
Methods
- ->new(seconds => $s, minutes => $m, hours => $h, day => $d, month => $mo, year => $y, day_of_week => $wd, day_of_year => $yd, is_dst => $dst)
-
All arguments are optional. If not given, they default to the value appropriate to the current time.
- ->seconds($s)
- ->minutes($m)
- ->hours($h)
- ->day($d)
- ->month($mo)
- ->year($y)
- ->day_of_week($wd)
- ->day_of_year($yd)
- ->is_dst($dst)
- ->time_t()