in reply to Re: What is the best way to get a list of all Mondays until the end of the year?
in thread What is the best way to get a list of all Mondays until the end of the year?
2008-01-07 2008-01-14 2008-01-21 2008-01-28 2008-02-04 2008-02-11 2008-02-18 2008-02-25 2008-03-03 2008-03-10 2008-03-17 2008-03-24 2008-03-31 2008-04-07 2008-04-14 2008-04-21 2008-04-28 2008-05-05 2008-05-12 2008-05-19 2008-05-26 2008-06-02 2008-06-09 2008-06-16 2008-06-23 2008-06-30 2008-07-07 2008-07-14 2008-07-21 2008-07-28 2008-08-04 2008-08-11 2008-08-18 2008-08-25 2008-09-01 2008-09-08 2008-09-15 2008-09-22 2008-09-29 2008-10-06 2008-10-13 2008-10-20 2008-10-27 2008-11-03 2008-11-10 2008-11-17 2008-11-24 2008-12-01 2008-12-08 2008-12-15 2008-12-22 2008-12-29#!/usr/bin/perl -- use strict; use warnings; use DateTime::Event::Recurrence; { my $dt1 = new DateTime( year => 2008 ); my $dt2 = new DateTime( year => 2009 ); my $der = DateTime::Event::Recurrence->weekly; print $_->ymd, ' ', ,$/ for $der->as_list( start => $dt1, end => $dt2 ); } # http://datetime.perl.org/index.cgi?FAQDurationsSetsSpans __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: What is the best way to get a list of all Mondays until the end of the year?
by Anonymous Monk on Aug 19, 2008 at 11:54 UTC |