Coder Social home page Coder Social logo

epochis's Introduction

epochis

A CLI to convert offsets from epoch to human readable dates

Usage

$ epochis --help
Usage
	epochis {date}{unit}
Example
	epochis 604m
Supported Units
	m:  months since epoch
	d:  days since epoch
	s:  seconds since epoch
	ms: milliseconds since epoch

Examples

# months since epoch
$ epochis 604m
2020-05

# days since epoch
$ epochis 18409d
2020-05-26

# seconds since epoch
$ epochis 1590537600s
2020-05-26 00:00:00

# milliseconds since epoch
$ epochis 1590537600ms
2020-05-26 00:00:00.000

Timezone support

All dates are in UTC. Timezone support may be added in the future.

Why doesn't this use third-party libraries?

There are plenty of libraries to choose from for functionality such as CLI args parsing so why didn't I use them? This project is just for fun so why not? I like to practice by writing functionality from scratch.

Dev Notes

To install locally as standalone CLI

python setup.py install

To upload to pypi

python setup.py sdist
twine upload dist/*

To run unit tests

python -m unittest

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.