README for Date

This module is for packages relating to Dates.

Note that this entire module was an early brain-fart as to what a fully Roles-ised date module would look like, and if you like the work at all, please feel free to play with it or adopt it.

ROLES

Date

The basic "Date" role defines operations applicable to points in time which are of no specific calendar, and deal in abstract times without enforcing a particular base unit or frame of reference.

However, pragmatically all Date modules should be able to convert to and from either Perl epoch seconds or Unix epoch seconds.

Duration

The "Duration" role is similar, but for referring to either the distance between two particular dates, or for calendars which such intervals two dates can be reasonably said to be not related to the date which they refer to, may be "floating" durations of some unit. They may also refer to generic units which do not apply a uniform length of time (by other measures) until they are applied to a particular Date.

That is the plan - in order to be sure that the above roles are truly abstracted from the calendars that they represent, a range of calendars will first be implemented. This will hopefully early on include access to the excellent but bulky DateTime framework.

ROLE IMPLEMENATIONS

Date::Gregorian

The "Date::Gregorian" module, based on the Perl 5 Class::Date, represents dates on the Gregorian calendar. It parses ISO-8601 dates "out of the box", and is very lightweight and pragmatic.

Duration::Gregorian

The "Date::Gregorian" module, based on the Perl 5 Class::Date::Rel, represents dates on the Gregorian calendar. It parses ISO-8601 intervals "out of the box".

DateTime

(planned)

A subclass of Date::Gregorian that is a direct port of the DateTime framework to Perl 6, probably initially using perl5embed.

DateTime::Duration

(planned)

A subclass of Duration::Gregorian that is where DateTime::Duration lives.

Date::Chinese

(planned)

Dates on the Chinese calendar, implemented from first principles. ie, its basic units are lunar months etc :-). It should closely correspond to DateTime::Calendar::Chinese.

Duration::Chinese

(planned)

Durations on the Chinese calendar.