Link to home
Start Free TrialLog in
Avatar of ichen
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
ASKER CERTIFIED SOLUTION
Avatar of flivauda
flivauda

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
sub days_since_1990 { use Time::Local; (timegm(0,0,0,$_[2],$_[1]-1,$_[0]-1900)-timegm(0,0,0,1,1-1,1990-1900)) / (60*60*24) }
Avatar of flivauda
flivauda

I just ported over my old C code, your is a little shorter =)