Skip to content
Snippets Groups Projects

1.0.10 Python: 2 to 3, (dt,dt) / td division, mtime object interface

Merged Karl-Hermann Wieners requested to merge 1.0.10-python-2to3-dt_dt_td_division-mtime into master
1 file
+ 4
3
Compare changes
  • Side-by-side
  • Inline
+ 4
3
@@ -17,7 +17,8 @@ def setCalendar(calendar_type):
libmtime.resetCalendar()
libmtime.setCalendar(calendar_type)
calendarToString = libmtime.calendarToString
def calendarToString():
return libmtime.calendarToString().decode()
class MTime (object):
'''\
@@ -87,10 +88,10 @@ class DateTime (MTime):
return self._my
@property
def date(self):
return Date(libmtime.dateToString(ctypes.byref(self._my.contents.date)))
return Date(libmtime.dateToString(ctypes.byref(self._my.contents.date)).decode())
@property
def time(self):
return Time(libmtime.timeToString(ctypes.byref(self._my.contents.time)))
return Time(libmtime.timeToString(ctypes.byref(self._my.contents.time)).decode())
class TimeDelta (MTime):
def __init__(self, spec):
Loading