Function to convert given number of seconds to day,time year since 1/1/2008

Hi there,

Given number a number in seconds like 82166400, i want to get a function that can convert it to time since 1/1/2008 (Hr, mins, secs, month, day, year).
First you need to write a function to calculate if a given year is leap or not. Some logic to help/hint:

if year is divisible by 400 then
   is_leap_year
else if year is divisible by 100 then
   not_leap_year
else if year is divisible by 4 then
   is_leap_year
else
   not_leap_year
Last edited on
Topic archived. No new replies allowed.