Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Find 30 days from today's date

by Anonymous Monk
on Apr 18, 2014 at 21:22 UTC ( [id://1082824]=note: print w/replies, xml ) Need Help??


in reply to Re: Find 30 days from today's date
in thread Find 30 days from today's date

No. This gives the time 2592000 non-leap seconds ago.

Sure, this code will be right most of the time, and it might even meet the OP's specs. However, it's lazy code like this that ignores the existing date/time modules which cause the subtle bugs that give people everywhere headaches. It's coding like this that causes people to ask questions like the original post in the first place.

Replies are listed 'Best First'.
Re^3: Find 30 days from today's date
by Discipulus (Canon) on Apr 19, 2014 at 17:36 UTC
    there are many ways to get the job done in Perl. I like this freedom as in 'free beer'
    It's up to the wisdom of the coder when choice a solution or another.
    In a critical application i would use some standard module about Date:: while in a oneliner maybe i would choice the simplest solution.

    I never propose me as 'The teacher' as you can guess looking at my nickname, maybe i need to add a standard disclaimer in the signature? ;=)

    can i cite BrowserUk as found here?
        On the basis of what I know, or at least what I think I know, I think this will help you, so here it is. It almost certainly isn't perfect, it may not even be relevant, though I believe it to be, and I am happy to offer it in case it helps, and to learn from the enevitable corrections that will come if what I believe is wrong.
    
    I think that this attitude is most succinctly and most prevelantly summed up by the oft-used sign-off HTH. -- Hope That Helps. 
    My best form of enjoy here at perlmonks is when i post something and many experienced or less monks, point me to some issue or better way to do it.

    Please let all solution to have the right to exist, the wisdom is in the coder not in the code.
    Cya

    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1082824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-16 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found