- Timestamp:
- 05/21/05 23:39:07 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r2266 r2268 22 22 PyKota NEWS : 23 23 24 - 1.23alpha5 : 25 26 - The data dumper's start= and end= date filtering options now accept 27 the special keywords 'yesterday', 'today', 'now' and 'tomorrow'. 28 24 29 - 1.23alpha4 : 25 30 -
pykota/trunk/pykota/storage.py
r2266 r2268 598 598 if (startdate is None) and (enddate is None) : 599 599 return (None, None) 600 if startdate.isdigit() and enddate.isdigit() : 600 601 now = DateTime.now() 602 nameddates = ('yesterday', 'today', 'now', 'tomorrow') 603 if ((startdate.lower() in nameddates) or startdate.isdigit()) and \ 604 ((enddate.lower() in nameddates) or enddate.isdigit()) : 601 605 datedict = { "start" : startdate, "end" : enddate } 602 606 for limit in datedict.keys() : 603 607 dateval = datedict[limit] 608 if dateval in nameddates : 609 if limit == "start" : 610 if dateval == "yesterday" : 611 dateval = (now - 1).Format("%Y%m%d000000") 612 elif dateval == "today" : 613 dateval = now.Format("%Y%m%d000000") 614 elif dateval == "now" : 615 dateval = now.Format("%Y%m%d%H%M%S") 616 else : # tomorrow 617 dateval = (now + 1).Format("%Y%m%d000000") 618 else : 619 if dateval == "yesterday" : 620 dateval = (now - 1).Format("%Y%m%d235959") 621 elif dateval == "today" : 622 dateval = now.Format("%Y%m%d235959") 623 elif dateval == "now" : 624 dateval = now.Format("%Y%m%d%H%M%S") 625 else : # tomorrow 626 dateval = (now + 1).Format("%Y%m%d235959") 627 604 628 lgdateval = len(dateval) 605 629 if lgdateval == 4 : -
pykota/trunk/pykota/version.py
r2267 r2268 22 22 # 23 23 24 __version__ = "1.23alpha 4_unofficial"24 __version__ = "1.23alpha5_unofficial" 25 25 26 26 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS and LPRng."