Changeset 24:3501b870f565 in stamper
- Timestamp:
- Jul 26, 2014, 6:18:22 PM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stamper/stamper.py
r23 r24 61 61 - %Y-%m-%d--%Y-%m-%d: Times recorded between two dates 62 62 63 - -%Y-%m-%d: Times recorded before a given date63 - _%Y-%m-%d: Times recorded before a given date 64 64 65 65 - +%Y-%m-%d: Times recorded after a given date … … 68 68 """ 69 69 # First try the date filters, one by one 70 matches = ['%Y-%m-%d', ' -%Y-%m-%d', '+%Y-%m-%d']70 matches = ['%Y-%m-%d', '_%Y-%m-%d', '+%Y-%m-%d'] 71 71 for match in matches: 72 72 try: 73 73 if '--' in stamp_filter: 74 74 filter_from, filter_to = stamp_filter.split('--') 75 filter_from = datetime.strptime( stamp_filter, match)76 filter_to = datetime.strptime( stamp_filter, match)75 filter_from = datetime.strptime(filter_from, match) 76 filter_to = datetime.strptime(filter_to, match) 77 77 else: 78 78 valid_filter = datetime.strptime(stamp_filter, match)
Note:
See TracChangeset
for help on using the changeset viewer.