GithubHelp home page GithubHelp logo

noize-e / whiterose Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14 KB

A python toolkit to work with date time functions

Home Page: https://test.pypi.org/project/whiterose/0.9.2/

License: MIT License

Python 100.00%
python datetime epoch timestamp unix

whiterose's Introduction

Whiterose - A Python DateTime Toolkit

"The concept of waiting bewilders me. There are always deadlines. There are always ticking clocks. That's why you must manage your time"
Whiterose - Mr. Robot

Install

Until the test suite is uploaded, the toolkit can be installed from TestPyPi.

pip install -i https://test.pypi.org/simple/ whiterose==0.9.2

Toolkit

localtime()

>>> localtime()
time.struct_time(...)

today()

>>> today('UTC')
'2020/12/18T22:24:58'
>>> today('MX')
'2020/12/18T16:24:58'

Epoch, The Unix Timestamps Manager

Epoch.dump()
>>> Epoch.dump(2020, 12, 18, 16)
1608328800.0
Epoch.load()
>>> tms = Epoch.load(epoch)
'2020-12-18 16:24:58.109826'
>>> type(tms)
"<class 'datetime.datetime'>"
Epoch.now()
>>> Epoch.now()
1608330298.110156
Epoch.strfload()
>>> Epoch.strfload(1608330298.110156, datetime=True)
'2020/12/18T16:24:58'
>>> Epoch.strfload(1608330298.110156, datetime=False)
'2020/12/18'

whiterose's People

Contributors

noize-e avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.