As a few of you might know, my wife is pregnant, and one thing people that is expecting a child finds out is that keeping track of the week count is very hard... So a oneliner comes to hand...
perl -MDateTime -e '$i=DateTime->new(year => 2008,month => 3,day => 5) +;print "$_ ",$i->add(weeks => 1)->strftime(q{%d/%m}), $/ for 1..40'
daniel
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Counting pregnancy weeks
by Limbic~Region (Chancellor) on Jun 09, 2008 at 22:52 UTC | |
Re: Counting pregnancy weeks
by svenXY (Deacon) on Jun 10, 2008 at 06:41 UTC | |
Re: Counting pregnancy weeks
by andreas1234567 (Vicar) on Jun 10, 2008 at 07:08 UTC |
Back to
Cool Uses for Perl