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

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 Re: How to get time in seconds from localtime(time) to next 21st date of the month?
  • Download Code