NAME

cs::DMY - convenience routines for date manipulation


SYNOPSIS

        use cs::DMY;
        $today = new cs::DMY();
        $then = new cs::DMY($yyyy,$mm,$dd);
        $then = new cs::DMY("yyyy-mm-dd");


DESCRIPTION

Assorted routines for maniplating, parsing and printing date information.


GENERAL FUNCTIONS


OBJECT ACCESS AND CREATION

new cs::DMY()

Obtain a new object with today's localtime date.

new cs::DMY(yyyy,mm,dd)

Obtain a new object with the specified date.

new cs::DMY(gmt)

Obtain a new object from the specified GMT time, rendered in local time.

new cs::DMY(yyyy-mm-dd)

Obtain a new object from the specified ISO date, rendered in local time.


OBJECT METHODS

Day()

Return the month day from this object (1..31).

Mon()

Return the month from this object (1..12).

Year()

Return the year from this object.

Dmy()

Return an array containing (day,month,year).

IsoDate

Return the ISO day code: YYYY-MM-DD.

Gmt()

Return the UNIX time in seconds of the start of this day, using the local time zone.

Prev(ndays)

Return a new cs::DMY object ndays earlier (1 day earlier if not specified).

Next(ndays)

Return a new cs::DMY object ndays later (1 day later if not specified).

Monday()

Return the first Monday not later than this date.


SEE ALSO

cs::TM(3)


AUTHOR

Cameron Simpson <cs@zip.com.au> 04dec2002