equal
deleted
inserted
replaced
|
1 """ mxDateTime - Date and time handling routines and types |
|
2 |
|
3 Copyright (c) 1998-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com |
|
4 Copyright (c) 2000-2007, eGenix.com Software GmbH; mailto:info@egenix.com |
|
5 See the documentation for further information on copyrights, |
|
6 or contact the author. All Rights Reserved. |
|
7 """ |
|
8 from DateTime import * |
|
9 from DateTime import __version__ |
|
10 |
|
11 ## mock strptime implementation |
|
12 from datetime import datetime |
|
13 |
|
14 def strptime(datestr, formatstr, datetime=datetime): |
|
15 """mocked strptime implementation""" |
|
16 date = datetime.strptime(datestr, formatstr) |
|
17 return DateTime(date.year, date.month, date.day, |
|
18 date.hour, date.minute, date.second) |
|
19 |
|
20 # don't expose datetime directly |
|
21 del datetime |