JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.4k stars 5.46k forks source link

Remove `Dates.value(::Date)` #54510

Open jariji opened 3 months ago

jariji commented 3 months ago

The value(::Date) method is not documented, it's not generic with the documented method, and I don't think we need it.

The documented method is

help?> Dates.value
  Dates.value(x::Period) -> Int64

  For a given period, return the value associated with that period. For example, value(Millisecond(10))
  returns 10 as an integer.

Method to be removed:

julia> Dates.value(Date(2000))
730120
quinnj commented 3 months ago

I think I'd be fine removing it, except I worry it would actually be fairly breaking for cases where people are using it. It unfortunately is one of those not-really-documented but some people are probably using/relying on it kind of things.