NAME
Date::TimeOfDay - Represent time of day (hh:mm:ss)
VERSION
version 0.001
SYNOPSIS
use Date::TimeOfDay;
my $tod = Date::TimeOfDay->new(
hour=>23, minute=>59, second=>59,
# nanosecond => 999_999_999, # optional
);
DESCRIPTION
EARLY RELEASE, API MIGHT CHANGE WITHOUT NOTICE.
This is a simple module to represent time of day. Interface is modelled after DateTime. Internal representation is currently float (number of seconds from midnight 00:00:00). Currently does not handle leap second nor time zone.
TODO:
* set
* strftime
* comparison
* add DateTime + TimeOfDay
* add TimeOfDay + TimeOfDay
* convert to duration
* convert to another time zone
METHODS
new
now_local
hires_now_local
now_utc
hires_now_utc
hour
minute
second
nanosecond
hms
(TODO) set
(TODO) strftime
stringify
Is also invoked via overload of q("").
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.