Calendar-DatesRoles-DataUser-CalendarVar
    
    
  
  
  
view release on metacpan or search on metacpan
    To mark an entry as an anniversary without starting year, you can set
    date to "MM-DD" or "--MM-DD" as previously explained.
    To mark an entry as an anniversary with starting year, you can either:
    1) set date to "R/YYYY-MM-DD/P1Y"; or 2) include "anniversary" tag.
METHODS
  get_min_year
    Only years from non-anniversary dates are accounted for when determining
    min_year and max_year. But if there are no non-anniversary dates in the
    calendar, then the years from anniversaries will also be used.
  get_max_year
    Only years from non-anniversary dates are accounted for when determining
    min_year and max_year. But if there are no non-anniversary dates in the
    calendar, then the years from anniversaries will also be used.
  get_entries
    Usage:
     $entries = $caldate->get_entries([ \%params , ] $year [ , $month [ , $day ] ]);
    Only entries from matching year will be used, unless for anniversary
    entries.
    By default, low-priority entries will not be included unless the
lib/Calendar/DatesRoles/DataUser/CalendarVar.pm view on Meta::CPAN
            # XXX hour, minute, second?
            if ($e->{tags} && (grep {$_ eq 'anniversary'} @{$e->{tags}})) {
                $min_anniv = $e->{year} if !defined($min_anniv) || $min_anniv > $e->{year};
                $max_anniv = 9999 if !defined($max_anniv) || $max_anniv < 9999;
            } else {
                $min = $e->{year} if !defined($min) || $min > $e->{year};
                $max = $e->{year} if !defined($max) || $max < $e->{year};
            }
        } elsif ($e->{date} =~ /\A(?:--)([0-9]{2})-([0-9]{2})\z/) {
            # anniversary without starting year
            $min_anniv = 1582 if !defined($min_anniv) || $min_anniv > 1582; # start of gregorian calendar :-)
            $max_anniv = 9999 if !defined($max_anniv) || $max_anniv < 9999;
            $e->{month} //= $1 + 0;
            $e->{day}   //= $2 + 0;
        } elsif ($e->{date} =~ m!\AR/([0-9]{4})-([0-9]{2})-([0-9]{2})/P1Y\z!) {
            # anniversary with starting year
            $min_anniv = $1   if !defined($min_anniv) || $min_anniv > $1;
            $max_anniv = 9999 if !defined($max_anniv) || $max_anniv < 9999;
            $e->{month} //= $2 + 0;
            $e->{day}   //= $3 + 0;
        } else {
lib/Calendar/DatesRoles/DataUser/CalendarVar.pm view on Meta::CPAN
To mark an entry as an anniversary with starting year, you can either: 1) set
date to C<R/YYYY-MM-DD/P1Y>; or 2) include "anniversary" tag.
=head1 METHODS
=head2 get_min_year
Only years from non-anniversary dates are accounted for when determining
min_year and max_year. But if there are no non-anniversary dates in the
calendar, then the years from anniversaries will also be used.
=head2 get_max_year
Only years from non-anniversary dates are accounted for when determining
min_year and max_year. But if there are no non-anniversary dates in the
calendar, then the years from anniversaries will also be used.
=head2 get_entries
Usage:
 $entries = $caldate->get_entries([ \%params , ] $year [ , $month [ , $day ] ]);
Only entries from matching year will be used, unless for anniversary entries.
By default, low-priority entries will not be included unless the parameter
( run in 0.984 second using v1.01-cache-2.11-cpan-5dc5da66d9d )