ichen
asked on
Days
I want to make a program to count a total days, examples i saved 01-31-98 (mm/dd/yy) then if today is 01-01-99 (mm/dd/yy) the program count a total days from 01-31-98. so the output from the program will be 1 days.
others examples, i save 02-01-99 then i input 03-01-99 then the outpun must be 28 days.. the output must be in days!!
Thanks
others examples, i save 02-01-99 then i input 03-01-99 then the outpun must be 28 days.. the output must be in days!!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sub days_since_1990 { use Time::Local; (timegm(0,0,0,$_[2],$_[1]- 1,$_[0]-19 00)-timegm (0,0,0,1,1 -1,1990-19 00)) / (60*60*24) }
I just ported over my old C code, your is a little shorter =)