2 Demonstrates some simple Timestamp operations
4 from mw import Timestamp
6 # Seconds since Unix Epoch
7 str(Timestamp(1234567890))
11 int(Timestamp("20090213233130"))
15 int(Timestamp("2009-02-13T23:31:30Z"))
18 # Difference in seconds
19 Timestamp("2009-02-13T23:31:31Z") - Timestamp(1234567890)
22 # strptime and strftime
23 Timestamp(1234567890).strftime("%Y foobar")
26 str(Timestamp.strptime("2009 derp 10", "%Y derp %m"))