Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: 3 days previous Date

by ungalnanban (Pilgrim)
on Jun 15, 2010 at 05:42 UTC ( #844788=note: print w/ replies, xml ) Need Help??


in reply to 3 days previous Date

Try with the following example code

use strict; use warnings; my $current = `date`; + print "Current date and time is $current"; print `date -d "1 day ago"`; print `date -d "1 week ago"`; print `date -d "1 month ago"`; print `date -d "1 year ago"`;


Comment on Re: 3 days previous Date
Download Code
Replies are listed 'Best First'.
Re^2: 3 days previous Date
by Anonymous Monk on Jun 15, 2010 at 14:40 UTC

    Running a shell so many times sounds expensive and not portable.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2015-07-29 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls