Giter Club home page Giter Club logo

compoundperiods.jl's Introduction

CompoundPeriods.jl

Some enhancements for Dates.CompoundPeriod


Copyright © 2018 by Jeffrey Sarnoff.    Released under The MIT License.


Docs Latest


This package enhances the CompoundPeriod type defined within Dates (Dates.CompoundPeriod). A CompoundPeriod is formed by attaching (adding) two or more distinct Periods:

julia> using Dates

julia> typeof( Year(1999) ), typeof( Hour(15) )
Year, Hour

julia> typeof( Year(1999) + Hour(15) )
Dates.CompoundPeriod

Note that typeof( compound_period ) is shown as CompoundPeriod rather than Dates.CompoundPeriod. This lets you know that enhanced CompoundPeriods are in use.

julia> using CompoundPeriods, Dates

julia> typeof( Year(1999) + Hour(15) )
CompoundPeriod

compoundperiods.jl's People

Contributors

jeffreysarnoff avatar jmkuhn avatar juliatagbot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

compoundperiods.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Overload of equality comparison (:==) fails with Julia 1.6

Running tests on 1.6 gives the following error:

MethodError: ==(::CompoundPeriod, ::CompoundPeriod) is ambiguous. Candidates:
    ==(x::P1, y::P2) where {P1<:CompoundPeriod, P2<:CompoundPeriod} in CompoundPeriods at /home/travis/build/JeffreySarnoff/CompoundPeriods.jl/src/compare.jl:1
    ==(x::CompoundPeriod, y::CompoundPeriod) in Dates at /home/travis/julia/share/julia/stdlib/v1.6/Dates/src/periods.jl:366

I guess the overload was required for pre-1.6 Julia. If so, we should conditionally exclude the overload for 1.6+, is this right?

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.