Synopsis: |
| getcenturyfromdate.py |
| ||
def GetCenturyFromDate(t): import time return int((time.localtime(t))[0] / 100); #-- unit tests def test_getcenturyfromdate(): ut.utassert(GetCenturyFromDate(0), 19) ut.utassert(GetCenturyFromDate(28799), 19) ut.utassert(GetCenturyFromDate(28800), 19) #28800 seconds is 8 hours ut.utassert(GetCenturyFromDate(1056523422), 20) ut.utassert(GetCenturyFromDate(1096523422), 20) |
| Contact me about content on this page using john_web-at-arrizza-dot-com |
| For Web Master or site problems contact: webadmin-at-arrizza-dot-com |
| Copyright John Arrizza (c) 2001,2002,2003,2004,2005,2006,2007 |