GithubHelp home page GithubHelp logo

bobhy / iso8601_interval Goto Github PK

View Code? Open in Web Editor NEW

This project forked from powersnail/iso8601_interval

0.0 0.0 0.0 13 KB

A rust library that parses ISO8601 time intervals.

License: MIT License

Rust 100.00%

iso8601_interval's Introduction

Parsing ISO 8601 time interval into chrono DateTime

It is a small addition to the chrono crate, parsing ISO 8601 time interval 1 into [IsoInterval] which contains a pair of DateTime objects, that respectively mark the beginning and end of the interval.

This utility is missing in chrono possibly due to the fuzziness of duration, which can be specified against year and month, so the time passed is inherently not absolute.

Interval is absolute in that regard, because when a starting or end point is fixed, the exact number of seconds passed can be calculated.

The dates, as parsed, are in FixedOffset time zone, and can be switched out by calling [IsoInterval::with_time_zone].

Footnotes

  1. https://en.wikipedia.org/wiki/ISO_8601#Time_intervals โ†ฉ

iso8601_interval's People

Contributors

powersnail 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.