Giter Site home page Giter Site logo

Comments (1)

oxinabox avatar oxinabox commented on June 19, 2024

Not relevent to you in this case as you have already swapped to IntervalSets.jl

We could use Requires.jl to make it an optionally loaded dependency, so that the code isn't loaded.
But we can't remove it from the Project.toml as otherwise we are unable to specify what semver version is compatible with.
Which is unsafe.
The real resolution is JuliaLang/Pkg.jl#1285

But we might we be to do, as you say is just remove those methods entirely.
These ones:

##### TIME ZONES #####
function TimeZones.astimezone(i::AnchoredInterval{P, ZonedDateTime, L, R}, tz::TimeZone) where {P,L,R}
return AnchoredInterval{P, ZonedDateTime, L, R}(astimezone(anchor(i), tz))
end
TimeZones.timezone(i::AnchoredInterval{P, ZonedDateTime}) where P = timezone(anchor(i))

function TimeZones.astimezone(i::Interval{ZonedDateTime, L, R}, tz::TimeZone) where {L,R}
return Interval{ZonedDateTime, L, R}(astimezone(first(i), tz), astimezone(last(i), tz))
end
function TimeZones.timezone(i::Interval{ZonedDateTime})
if timezone(first(i)) != timezone(last(i))
throw(ArgumentError("Interval $i contains mixed timezones."))
end
return timezone(first(i))
end

don't really seem idoiomatic julia in the first place.
Since they are kind of like implict broadcasting (removed in julia 1.5) -- not exactly the same.
The timezone of an interval IMO should be found out by asking about time timezone of the endpoints (or the anchor), and set similarly.
I always forget you can do that.
I don't think we do that anywhere in our internal codebase

from intervals.jl.

Related Issues (20)

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.