Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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.

Replies are listed 'Best First'.
Re^3: Find 30 days from today's date
by Discipulus (Monsignor) 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.

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1082909]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-03-25 05:43 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (300 votes). Check out past polls.