Giter VIP home page Giter VIP logo

nim-datetime2human's Introduction

nim-datetime2human

Calculate date & time with precision from seconds to millenniums. Human friendly date time as string. ISO-8601.

screenshot

Use

>>> import datetime2human
>>> echo datetime2human(now())
(human: "5 Decades 2 Years 6 Months 2 Weeks 3 Days 2 Hours 4 Minutes 16 Seconds", short: "5 Decades", iso: "2018-05-05 23:04:16-03:00", units: (seconds: 16, minutes: 4, hours: 2, days: 3, weeks: 2, months: 6, years: 2, decades: 5, centuries: 0, millenniums: 0))
echo now2human()
(human: "5 Decades 2 Years 6 Months 2 Weeks 3 Days 2 Hours 4 Minutes 16 Seconds", short: "5 Decades", iso: "2018-05-05 23:04:16-03:00", units: (seconds: 16, minutes: 4, hours: 2, days: 3, weeks: 2, months: 6, years: 2, decades: 5, centuries: 0, millenniums: 0))
>>>

Install

nimble install datetime2human

Requisites

Documentation

datetime2human()

Description: Calculate date & time with precision from seconds to millenniums. Human friendly date time as string. ISO-8601 representation. The proc only accepts DateTime.

Arguments:

  • datetime_obj A valid DateTime object, DateTime type, required.

Returns: HumanTimes type, a tuple.

now2human()

Description: Now expressed as human friendly time units string, Just a shortcut to datetime2human.

Arguments: None.

Returns: HumanTimes type, a tuple.

nim-datetime2human's People

Contributors

juancarlospaco avatar prasad83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

din-dke prasad83

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.