| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::Time - Class methods for date and time manipulation
$Revision: 576 $
use parent qw(CatalystX::Usul::Time);
This module implements a few simple time related methods
Inherited by the base class the methods in this module are available to both controllers and models
$self->nap( $period );
Sleep for a given number of seconds. The sleep time can be a fraction of a second
$iso_string = $self->stamp( $time );
Return a date time stamp in ISO format (%Y-%m-%d %H:%M). Defaults to current time if non supplied
$date_time = $self->str2date_time( $dstr, $zone );
Parse a date time string and return a DateTime object. Timezone optional
$time = $self->str2date_time( $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. Timezone optional
$time_string = $self->time2str( $format, $time );
Returns a formatted string representation of the given time (supplied in seconds elapsed since the epoch)
None
None
There are no known incompatibilities in this module.
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
Copyright (c) 2008 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
| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |