Welcome to the Monastery | |
PerlMonks |
Re^3: Yesterday Dateby moritz (Cardinal) |
on Feb 04, 2008 at 19:57 UTC ( [id://666076]=note: print w/replies, xml ) | Need Help?? |
$d-- is short for $d = $d -1, that is "subtract one from $d".
Date::Simple provides a date object, and you can add and subtract number from that, so today() - 1 is yesterday. Then it decreases the value by one while the day of week is 0 (Sunday) or 6 (Saturday).
In Section
Seekers of Perl Wisdom
|
|