Originally posted as a Categorized Question.
In reply to How to get time in seconds from localtime(time) to next 21st date of the month? by basman