Date-Tie
    
    
  
  
  
view release on metacpan or search on metacpan
lib/Date/Tie.pm view on Meta::CPAN
    # copy a date with timezone
    tie my %newdate, 'Date::Tie', tz => $date{tz}, epoch => $date{epoch};
    or
    tie my %newdate, 'Date::Tie', %date;
=head1 DESCRIPTION
Date::Tie is an attempt to simplify date operations syntax.
It works with calendar dates (year-month-day), 
ordinal dates (year-day), week dates (year-week-day),
times (hour:minute:second), decimal fractions (decimal hours,
decimal minutes and decimal seconds), and time-zones. 
Whenever a Date::Tie hash key receives a new value, it will change 
the other keys following the ISO date rules. 
For example: 
     print $a{hour}, ":", $a{minute};     #  '00:59'
     $a{minute}++;
lib/Date/Tie.pm view on Meta::CPAN
All keys can be read and written to.
=over 4
=item I<year>, I<month>, I<day> or I<monthday>, I<hour>, I<minute>, I<second>
These keys are just what they say. 
You can use B<I<monthday>> instead of I<day> if you want to make it clear
it is not a I<yearday> (ordinal calendar) or a I<weekday> (week calendar). 
=item I<yearday>, I<week>, I<weekday>, I<weekyear>
B<I<yearday>> is the day number in the year.
B<I<weekday>> is the day number in the week. I<weekday> C<1> is monday.
B<I<week>> is the week number in the year.
B<I<weekyear>> is the year number, when referring to a week of a year.
( run in 0.256 second using v1.01-cache-2.11-cpan-5dc5da66d9d )