25.12.2018, 08:41
you need to do some mathematical calculation to convert a timestamp into desired format like
year = timestamp/(365*24*60*60) % 365
month = timestamp/(30*24*60*60) % 30
week = timestamp/(7*24*60*60) % 7
Days = timestamp/(24*60*60) % 24
Hour = timestamp/(60*60) % 24
Minute = timestamp/(60) % 60
Seconds = timestamp % 60
year = timestamp/(365*24*60*60) % 365
month = timestamp/(30*24*60*60) % 30
week = timestamp/(7*24*60*60) % 7
Days = timestamp/(24*60*60) % 24
Hour = timestamp/(60*60) % 24
Minute = timestamp/(60) % 60
Seconds = timestamp % 60