GithubHelp home page GithubHelp logo

bobdotcom / time_str Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 104 KB

Time_Str is a package to convert user input into datetime.timedelta objects.

Home Page: https://time-str.rtfd.io

License: MIT License

Python 100.00%
python datetime timedelta string

time_str's Introduction

Time_Str

Checked with mypy linting: pylint Code style: black

Codecov Checks Type Check and Lint Unit Tests pre-commit.ci status

PyPI version info PyPI supported Python versions Documentation Status Download Counter Latest release

A package to convert user input into datetime.timedelta objects.

PyPI: https://pypi.org/project/time-str/

Docs: https://time-str.rtfd.io/

Installation

You can install released versions of time_str from the Python Package Index via pip or a similar tool:

Stable Release: pip install time_str

Working Version: pip install git+https://github.com/BobDotCom/time_str.git

Usage

import time_str
converter = IntervalConverter('11 months 9days 1m 3 sec')
print(converter.timedelta_precise())
print(converter.datetime_precise())

time_str's People

Contributors

bobdotcom avatar dependabot[bot] avatar pre-commit-ci[bot] avatar yo56789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

time_str's Issues

new format support

Hi so, I think it'd be nice to have a support for like, putting "4/16 12:05" as input string which would return a datetime obj for april 16th at 12:05. :)

Cache coverage file and always run upload on PR

Line: 4

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# TODO: Cache coverage file and always run upload on PR
name: Unit Tests
on: [push, pull_request]
jobs:
pytest:

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.