
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
Adjusting Date By Number Of DaysBy Will Bontrager Unix system time is the number of seconds elapsed since January 1, 1970. Dates and times can be calculated from a system time number, with Perl, using the localtime() function. The "Converting and Formatting System Time" blog post has more information. To adjust a date by a certain number of days, convert the date to a system time number, adjust the system time number by 86400 for each day, then convert the result into a date. (86400 is the number of seconds in a day.) Here is a Perl script to do that. The script starts with a date. It then prints the date 90 days later and the date 90 days earlier. May 1, 2008 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|