Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: How to find the last date of the previous month?

by moritz (Cardinal)
on Oct 30, 2012 at 05:27 UTC ( #1001455=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use Date::Simple qw/today/;
    use 5.010;
    my $month = $d->month;
    $d-- while $month == $d->month;
    say $d;
  2. or download this
    use Date::Simple qw/today ymd/;
    use 5.010;
    my $d = today;
    $d = ymd($d->year, $d->month, 1) - 1;
    say $d;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001455]
[stevieb]: I wouldn't even check your passport ;)
[shmem]: next week again +12
[stevieb]: In all seriousness, I have an open invitation to my ranch. Few take it up, but I have traveled and can tour more of this country than anyone I know
[stevieb]: hahaha -10c? For 1.5 months it was a near consistent -36f
shmem lifts an eyebrow at stevieb. Be warned...
[stevieb]: It's been hovering around -5c (dark) and +10c daytime and the snow is melting. The moose are leaving, and I expect the black and grizzly bears to come out of hibernation any time now. The lake is cracking up even. The warm weather, and...
[stevieb]: ...especially the lengthening of days has been beautiful. In dead winter (solstace) we had ~5 or less hours of daylight. Suddenly, here at sprint, we've got 12+.
[stevieb]: sprint =~ s/t/g/;

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2018-03-22 00:22 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (272 votes). Check out past polls.