Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/DateTime.ConvertYearToBC.1.py
2012-04-10 03:16:37 +00: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)