more examples

This commit is contained in:
Daniel Tsvetkov 2019-12-12 17:40:03 +01:00
parent 5241e23578
commit 3a39204d26
2 changed files with 16 additions and 4 deletions

0
src/__init__.py Normal file
View File

View File

@ -197,8 +197,6 @@ if __name__ == "__main__":
"=================" "================="
"2019-12-12T03:14:15" # ISO-8601 Naive time "2019-12-12T03:14:15" # ISO-8601 Naive time
"2019-12-12T03:14:15+0000" # ISO-8601 Timezone aware "2019-12-12T03:14:15+0000" # ISO-8601 Timezone aware
"in 3 hours" # Time:relative:future
"5 days ago" # Time:relative:past
"<TIME> IN <WHEREVER>" "<TIME> IN <WHEREVER>"
"=================" "================="
@ -211,10 +209,24 @@ if __name__ == "__main__":
"Now in Alfa" # Timezone:Military - https://en.wikipedia.org/wiki/List_of_military_time_zones "Now in Alfa" # Timezone:Military - https://en.wikipedia.org/wiki/List_of_military_time_zones
"Now in +02:00" # Timezone:Offset - https://en.wikipedia.org/wiki/List_of_UTC_time_offsets "Now in +02:00" # Timezone:Offset - https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
"<TIME> IN <WHEREVER> TO <WHEREVER>"
"=================================="
"Now in Bulgaria to UTC" # == "Now in UTC"
"2019-12-12 03:14:15+03:00 to New York" # Something in +03:00 to Location:City
"<TIMEDELTA>" "<TIMEDELTA>"
"=================" "================="
"Time since <TIME>" # Timedelta:past "[Time] since <TIME>" # now-<TIME> -> timedelta
"Time until <TIME>" # Timedelta:future "[Time] until <TIME>" # <TIME>-now -> timedelta
"[Time] between 27-01-1992 and 09 May 1997" # == end_dt - start_dt -> timedelta
"<TIME CALCULATION>"
"================="
"in 3 hours" # == now+3 hours -> datetime
"5 days ago" # == now-5 days -> datetime
"12-12-2019 + 2 weeks" # == dt + timedelta -> datetime
"05:23 - 150 minutes" # == dt - timedelta -> datetime
# strptime: str -> datetime # strptime: str -> datetime
# strftime: datetime -> str # strftime: datetime -> str