OSDN Git Service

day-month better
authoryamat0jp <yamat0jp@yahoo.co.jp>
Thu, 24 Nov 2016 12:48:55 +0000 (21:48 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Thu, 24 Nov 2016 12:48:55 +0000 (21:48 +0900)
__pycache__/index.cpython-35.pyc
index.py

index 123ed9a..9e1ffb1 100644 (file)
Binary files a/__pycache__/index.cpython-35.pyc and b/__pycache__/index.cpython-35.pyc differ
index 18a2395..8325185 100755 (executable)
--- a/index.py
+++ b/index.py
@@ -103,7 +103,8 @@ class TitleHandler(NaviHandler):
                 rec = sorted(table.all(),key=lambda k: k['number'])
                 s = rec[i-1]['date']
                 item['date'] = s
-                item['date2'] = datetime.strptime(s,'%Y/%m/%d %H:%M').day
+                i = datetime.strptime(s,'%Y/%m/%d %H:%M')
+                item['date2'] = 31*i.month+i.day
             yield item
         
 class RegistHandler(tornado.web.RequestHandler):