Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/wx.DateTime.ConvertYearToBC.1.py
2016-05-18 16:38:18 -07:00

6 lines
211 B
Python

dt = wx.DateTimeFromDMY(8, 5, 1977)
y = dt.GetYear()
epoch = (y > 0 and ["AD"] or ["BC"])[0]
print "The year is %d%s"%(wx.DateTime.ConvertYearToBC(y), epoch)