mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Add some helper functions for converting to/from Python datetime objects similar to what is in Classic.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,7 +127,16 @@ class datetime_Tests(wtc.WidgetTestCase):
|
||||
d2 = wx.DateTime()
|
||||
d2.ParseFormat(st, fmt)
|
||||
self.assertEqual(d, d2)
|
||||
|
||||
|
||||
def test_datetimeConvertHelpers(self):
|
||||
d1 = wx.DateTime(1, wx.DateTime.Mar, 2012, 8, 15, 45)
|
||||
pd = wx.wxdate2pydate(d1)
|
||||
d2 = wx.pydate2wxdate(pd)
|
||||
self.assertTrue(isinstance(pd, datetime.datetime))
|
||||
self.assertEqual(d1, d2)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user