Name
Class::Usul::Time - Functions for date and time manipulation
Synopsis
use Class::Usul::Time qw( time2str );
Description
This module implements a few simple time related functions
Subroutines/Methods
nap
nap( $period );
Sleep for a given number of seconds. The sleep time can be a fraction of a second
str2date_time
$date_time = str2date_time( $dstr, [$zone] );
Parse a date time string and return a DateTime object. The time zone is optional
str2time
$time = str2time( $dstr, [$zone] );
Parse a date time string and return the number of seconds elapsed since the epoch. This subroutine is copyright (c) 1995 Graham Barr. All rights reserved. It has been modified to treat 9/11 as the ninth day in November. The time zone is optional
str2time_piece
$time_piece = str2time_piece( $dstr, [$zone] );
Parse a date time string and return a Time::Piece object. The time zone is optional
time2str
$time_string = time2str( [$format], [$time], [$zone] );
Returns a formatted string representation of the given time (supplied in seconds elapsed since the epoch). Defaults to ISO format (%Y-%m-%d %H:%M:%S) and current time if non supplied. The timezone defaults to local time
Diagnostics
None
Configuration and Environment
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module.
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2016 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE