GithubHelp home page GithubHelp logo

dm3 / timesdates.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeffreysarnoff/timesdates.jl

0.0 2.0 0.0 571 KB

Nanosecond resolution for Time and Date, TimeZones

License: MIT License

Julia 100.00%

timesdates.jl's Introduction

TimesDates

Nanosecond Resolvable Times with Dates, or Times with Dates in TimeZones.


Copyright © 2018 by Jeffrey Sarnoff.    This work is made available under The MIT License.


Travis Build Status   Docs Latest


Setup

install

This package expects Julia v1 (v0.7 is allowed)

pkg> up
pkg> add TimeZones
pkg> add CompoundPeriods
pkg> add TimesDates
pkg> precompile

use

using TimesDates, CompoundPeriods, TimeZones, Dates

The Design

This package provides TimeDate to hold the date and time of day given in nanoseconds (or more coarsely). And providesTimeDateZone to holds the the date and time of day in nanoseconds with a timezone. This work relies heavily on Dates and TimeZones; most of the attention to detail plays through.

Dates has a Time type that has nanosecond resolution; it is not well supported, even within Dates. This Time type recognizes strings only if they are limited to millisecond resolution. Only millisecond resolved times are relevant to DateTimes. While at present limited by this millisecond barrier, TimeZones is a laudable package with active support. I expect an eventual melding of what's best.

Here, the inner dynamics rely upon the Period types (Year .. Day, Hour, .., Nanosecond) and CompoundPeriod all provided by Dates. We distinguish slowtime, which is millisecond resolved, from a nanosecond resolved fasttime.

The general approach is separate the date, slowtime, fasttime, and timezone (if appropriate), then use the date, slowtime and timezone (if appropriate) to obtain a coarse result using the facilities provided by the Date and TimeZones packages. We refine the coarse result by adding or subtracting the fasttime, as appropriate.

Acknowledgements

This work is built atop Dates and TimeZones.

While both are collaborative works, a few people deserve mention:

  • Dates: Jacob Quinn and Stefan Karpinski
  • TimeZones: Curtis Vogt
  • early work on timezones: Avik Sengupta

timesdates.jl's People

Contributors

jeffreysarnoff avatar danberge avatar christiankurz avatar cdsthreeline avatar fredrikekre avatar

Watchers

James Cloos 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.