Oryx::Value::DateTime - Values storing dates and times
package CMS::Event;
use base qw( Oryx::Class );
use Class::Date qw( now );
our $schema = {
attributes => [ {
name => 'summary',
type => 'String',
}, {
name => 'when',
type => 'DateTime',
} ],
};
$x = CMS::Event->create({
summary => 'Meet with Joe',
when => now,
});
This type stores dates and times by using Class::Date objects.
This value will check to see that the value stored is a proper
date and will inflate and deflate the date using Class::Date to be stored in
a "DateTime" primitive type field.
Richard Hundt <richard NO SPAM AT protea-systems.com>
This library is free software and may be used under the same terms as Perl
itself.