NAME

Krang::ElementClass::Date - date element class


SYNOPSIS

  $class = pkg('ElementClass::Date')->new(name         => "issue_date",
                                          default      => Time::Piece->new(),
                                          start_year   => 1990,
                                          end_year     => 2020);


DESCRIPTION

Provides a date field element class.


INTERFACE

All the normal Krang::ElementClass attributes are available. The data() field for elements of this class stores a Time::Piece object.

The XML format for the data of this element in an ISO-8601 date-time like:

  2004-10-01T12:53:01Z

The date must be expressed in UTC with the timezone specifier ``Z''. It will be transformed into local-time when loaded.