02.06.2012, 15:33
You can choose the GMT in which you live. Leap years are hard to make indeed, but debugging showed it works (for me) and it was hard to think about. Just the tests I tried showed it works, but of course it might be a bit buggy.
But thanks for looking. I can always do something with what you say ^^
Код:
[13:41:00] tmp = 2, timestamp: 1307101260 [13:41:00] tmp = 1, timestamp: 1275565260 [13:41:00] LEAP YEAR - timestamp: 1243942860 [13:41:00] tmp = 4, timestamp: 1212406860 [13:41:00] tmp = 3, timestamp: 1180870860 [13:41:00] tmp = 2, timestamp: 1149334860 [13:41:00] tmp = 1, timestamp: 1117798860 [13:41:00] LEAP YEAR - timestamp: 1086176460 [13:41:00] tmp = 4, timestamp: 1054640460 [13:41:00] tmp = 3, timestamp: 1023104460 [13:41:00] tmp = 2, timestamp: 991568460 [13:41:00] tmp = 1, timestamp: 960032460 [13:41:00] LEAP YEAR - timestamp: 928410060 [13:41:00] tmp = 4, timestamp: 896874060 [13:41:00] tmp = 3, timestamp: 865338060 [13:41:00] tmp = 2, timestamp: 833802060 [13:41:00] tmp = 1, timestamp: 802266060 [13:41:00] LEAP YEAR - timestamp: 770643660 [13:41:00] tmp = 4, timestamp: 739107660 [13:41:00] tmp = 3, timestamp: 707571660 [13:41:00] tmp = 2, timestamp: 676035660 [13:41:00] tmp = 1, timestamp: 644499660 [13:41:00] LEAP YEAR - timestamp: 612877260 [13:41:00] tmp = 4, timestamp: 581341260 [13:41:00] tmp = 3, timestamp: 549805260 [13:41:00] tmp = 2, timestamp: 518269260 [13:41:00] tmp = 1, timestamp: 486733260 [13:41:00] LEAP YEAR - timestamp: 455110860 [13:41:00] tmp = 4, timestamp: 423574860 [13:41:00] tmp = 3, timestamp: 392038860 [13:41:00] tmp = 2, timestamp: 360502860 [13:41:00] tmp = 1, timestamp: 328966860 [13:41:00] LEAP YEAR - timestamp: 297344460 [13:41:00] tmp = 4, timestamp: 265808460 [13:41:00] tmp = 3, timestamp: 234272460 [13:41:00] tmp = 2, timestamp: 202736460 [13:41:00] tmp = 1, timestamp: 171200460 [13:41:00] LEAP YEAR - timestamp: 139578060 [13:41:00] tmp = 4, timestamp: 108042060 [13:41:00] tmp = 3, timestamp: 76506060 [13:41:00] tmp = 2, timestamp: 44970060 [13:41:00] tmp = 1, timestamp: 13434060