NAME

BingoX::Time - Time display parent class containing generic methods

SYNOPSIS

use BingoX::Time;

CONSTRUCTORS

$BR = $proto->new( [ $time ] [, $data_object ] );

OBJECT METHODS

$date->month_full;
$date->month_full2abrv;

$date->months_list;
$date->months_full_list;

$date->months;
$date->months_pad;
$date->months_full;
$date->months_full_pad;
$date->month_abrv;

$date->int_months;
$date->int_months_full;

$date->last_day;
$date->last_days;

$date->is_leap_year;

$date->hours24;
$date->hours;
$date->minutes;

REQUIRES

Date::Language, Time::Object, strict

EXPORTS

localtime, gmtime

DESCRIPTION

Time provides an OO interface to Time/Dates, ala Time::Object.

METHODS

new ( [ $time ] [, $islocal ] )

This is a Time::Object overloaded constructor that can take as values the time in seconds, or defaults to 'time'. It can also take the $islocal flag, which tells _mktime() to use localtime (1) or gmtime (0). It always returns a BingoX Time Object.

month_full ( )

Returns the full month string based on the integer month.

month_full2abrv ( )

Returns the abbreviated (3 char) month string based on the full month name.

months_list ( )

Returns an array ref of abbreviated months.

months_full_list ( )

Returns an array ref of months.

months ( )

Returns a hash ref of abbreviated months. With the keys being the true month value (1 .. 12).

months_full ( )

Returns a hash ref of full month names. With the keys being the true month value (1 .. 12).

month_abrv ( )

Returns a hash ref of abbreviated months. With the keys being the full month name.

int_months ( )

Returns a hash ref of abbreviated months. With the keys being the integer month value (0 .. 12).

int_months_full ( )

Returns a hash ref of full month names. With the keys being the integer month value (0 .. 12).

last_day ( [ $mon ] [, $year ] )

Returns the last day of the of the month and year passed. If nothing is passed then it uses the objects month and year. Month is the integer month 0 .. 11, and year is the 4 digit year.

last_days ( )

Returns a hash ref of the last day for each month. The keys are the integer months (0 .. 11).

is_leap_year ( )

Returns true if the year is a leap year.

hours24 ( )

Returns an array ref of hours in 24hr time.

hours ( )

Returns an array ref of hours in 12hr time. Padded with zeros.

minutes ( )

Returns an array ref of minutes (0 .. 60). Padded with zeros.

REVISION HISTORY

$Log: Time.pm,v $
Revision 1.6  2000/09/13 20:10:42  thai
 - added use Data::Language::English

Revision 1.5  2000/09/13 18:17:21  david
Data::Dumper only loaded if $debug is on.

Revision 1.4  2000/09/08 05:18:53  thai
 - added:
     month_full()
     month_full2abrv()
 - updated the POD documentation

Revision 1.3  2000/09/08 00:56:09  thai
 - fixed the POD errors per Smeg's request

Revision 1.2  2000/09/07 22:27:32  thai
 - added:
     last_day()
     last_days()
     is_leap_year()

Revision 1.1  2000/09/07 18:27:57  thai
 - has ousted DateTime::Date as the default date/time class
 - sub classes Time::Object

SEE ALSO

Time::Object, perl(1).

KNOWN BUGS

None

TODO

Nothing yet... anybody have suggestions?

COPYRIGHT

Copyright (c) 2000, Cnation Inc. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the GNU Lesser General Public License as published by the Free Software Foundation.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AUTHORS

Thai Nguyen <thai@cnation.com>