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

Answer: How to get time in seconds from localtime(time) to next 21st date of the month?

( #47516=categorized answer: print w/ replies, xml ) Need Help??

Q&A > dates and times > How to get time in seconds from localtime(time) to next 21st date of the month? contributed by Fastolfe

Yes I see your restriction against using Date::Manip, and I'm not going to bother asking what that's all about, but in the event someone else comes upon your question (which is the purpose for posting it into Q&A, right?), they may not have such restrictions placed on their development. In such a case, the following code might be useful:
use Date::Manip; $diff = &DateCalc("now", "21st at midnight"); $seconds = &Delta_Format($diff, 0, "%st");
You can certainly use other modules such as Date::Calc, but it will require additional logic.

Comment on Answer: How to get time in seconds from localtime(time) to next 21st date of the month?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-11-24 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (141 votes), past polls