CatalystX::Usul::Time - Class methods for date and time manipulation


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.

Index


Name

Top

CatalystX::Usul::Time - Class methods for date and time manipulation

Version

Top

$Revision: 576 $

Synopsis

Top

   use parent qw(CatalystX::Usul::Time);

Description

Top

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

Subroutines/Methods

Top

nap

   $self->nap( $period );

Sleep for a given number of seconds. The sleep time can be a fraction of a second

stamp

   $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

str2date_time

   $date_time = $self->str2date_time( $dstr, $zone );

Parse a date time string and return a DateTime object. Timezone optional

str2time

   $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

time2str

   $time_string = $self->time2str( $format, $time );

Returns a formatted string representation of the given time (supplied in seconds elapsed since the epoch)

Diagnostics

Top

None

Configuration and Environment

Top

None

Dependencies

Top

DateTime::Format::Epoch
Time::HiRes
Time::Local
Time::Zone

Incompatibilities

Top

There are no known incompatibilities in this module.

Bugs and Limitations

Top

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Top

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Top


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.