Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Time:
- class Segment
- constructor: (@seconds) ->
- getSeconds: -> if (t = ((@seconds)>>0)%(60))<10 then '0' + t else t
- getMinutes: -> if (t = ((@seconds/60)>>0)%(60))<10 then '0' + t else t
- getHours: -> if (t = ((@seconds/60/60)>>0)%(60))<10 then '0' + t else t
- getDays: -> if (t = ((@seconds/60/60/24)>>0)%(60))<10 then '0' + t else t
- getMonths: (daysPerMonth = 30) -> if (t = ((@seconds/60/60/24/daysPerMonth)>>0)%(60))<10 then '0' + t else t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement