Changeset 25:8e33103a7e36 in stamper
- Timestamp:
- Jul 30, 2014, 4:27:41 PM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stamper/stamper.py
r24 r25 9 9 10 10 STAMPS_FILE = expanduser('~/.workstamps.json') 11 DATE_FORMAT = '%Y-%m-%d %H:%M' 11 DATE_FORMAT = '%Y-%m-%d' 12 DATETIME_FORMAT = '%Y-%m-%d %H:%M' 12 13 HOURS_DAY = 8 13 14 SECS_DAY = HOURS_DAY * 60 * 60 … … 51 52 52 53 def worktime(self, start, end): 53 worktime = (datetime.strptime(end, DATE _FORMAT) -54 datetime.strptime(start, DATE _FORMAT))54 worktime = (datetime.strptime(end, DATETIME_FORMAT) - 55 datetime.strptime(start, DATETIME_FORMAT)) 55 56 return worktime.seconds 56 57
Note:
See TracChangeset
for help on using the changeset viewer.