Skip to content

yokowu/timekit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timekit Simple, easy-to-use time converter

supports Python3

Installation

pip3 install timekit

Example

str to timestamp

>>> import timekit
>>> t = timekit.get('2018-01-01 15:34:34')
>>> t.timestamp
1514792074.0

timestamp to str

>>> t = timekit.get(1514792074)
>>> t.strftime()
'2018-01-01 15:34:34'
>>> t.strftime('%Y-%d-%m')  # You can specify the format
'2018-01-01'

get current time

>>> t = timekit.now()
>>> t.timestamp
1541815100.0
>>> t.strftime()
'2018-11-10 09:58:20'

About

Simple, easy-to-use time converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages