Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tallesl committed Sep 30, 2019
1 parent f83c49e commit 4acdd6d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ Unix timestamp made easy.
```py
from unix_time import *

now = ts_now() # 1568122835, 2019-09-10T13:40:35
today = ts_today() # 1568073600, 2019-09-10T00:00:00
now = ts_now() # 1568078625, 2019-09-10T01:23:45

yesterday = ts_yesterday() # 1567987200, 2019-09-09T00:00:00
today = ts_today() # 1568073600, 2019-09-10T00:00:00
tomorrow = ts_tomorrow() # 1568160000, 2019-09-11T00:00:00

from datetime import datetime

dt = datetime.fromisoformat('2019-09-10T01:23:45+00:00')

some_time = 1111111111 # 1111111111, 2005-03-18T01:58:31
some_date = ts_date(some_time) # 1111104000, 2005-03-18T00:00:00
date_plus_time = ts(dt) # 1568078625, 2019-09-10T01:23:45
date_no_time = ts_date(dt) # 1568073600, 2019-09-10T00:00:00
```

0 comments on commit 4acdd6d

Please sign in to comment.