NAME

Calendar::Model::Day - Simple class modelling Calendar day

SYNOPSIS

my $cal = Calendar::Model->new(selected_date=>DateTime->new(day=>3, month=>1, year=>2013));

my $day2 = $cal->weeks->[0][2];

$day2->dow_name; # 'Tuesday'

$day2->day_of_week; # 3

$day2->dd; # '01'

$day2->yyyy; # '2013'

$day->to_DateTime; # DateTime object

ATTRIBUTES

dmy - date in DD-MM-YYYY format
day_of_week - day of week (1 (Monday) to 7)
dow_name - day of week name (Monday, etc)
dd - day of month
mm - Month number ( 0-12 )
yyyy - Year (4 digits)

METHODS

new

Class constructor method, returns a Calendar::Model::Day object based on the arguments :

dmy - required a date in DD-MM-YYYY format
day_of_week - required day of week (1 to 7)

BUILD

Std Moose initialisation hook called by constructor method

to_DateTime

Object method, returns a DateTime object built from the days attributes

LICENSE AND COPYRIGHT

Copyright 2012 Aaron Trevena.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.