Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by BrowserUk (Pope)
on Apr 19, 2014 at 18:36 UTC ( #1082909=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

A couple of tweaks improve it somewhat:

C:\test>perl -e "$x = scalar localtime (int(time()/43200)*43200 - $ARG +V[0] * 86400); substr($x,11,9,''); print $x" 30 Thu Mar 20 2014

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^2: Find 30 days from today's date
Download Code
Re^3: Find 30 days from today's date
by Discipulus (Priest) on Apr 19, 2014 at 22:03 UTC
    eh eh quoting you is like a summoning spell..
    you burned me on time (appropriate analogy) BrowserUk .. i was thinking how to tweak it too.

    And if you are searching files newer than..? my oneliner skips all seconds between midnigth and the current second: this seems to be an headcache for anonymous. So i have tweacked this way:
    perl -MTime::Local -e " print scalar localtime (timelocal(0, 0, 0, @{[ +localtime(time - $ARGV[0] * 86400)]}[3..8]))" 30 #output Thu Mar 20 00:00:00 2014
    very lazy solution.

    HtH
    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
Node Status?
node history
Node Type: note [id://1082909]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2015-07-04 19:02 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 (60 votes), past polls