Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

zero is not defined on DateTime360Day #30

Closed
rafaqz opened this issue Jan 13, 2025 · 0 comments · Fixed by #31
Closed

zero is not defined on DateTime360Day #30

rafaqz opened this issue Jan 13, 2025 · 0 comments · Fixed by #31

Comments

@rafaqz
Copy link
Member

rafaqz commented Jan 13, 2025

On DateTime zero works:

julia> zero(DateTime)
0 milliseconds

But on CFTime.DateTime360Day (and maybe other types here?) it fails:

julia> zero(CFTime.DateTime360Day)
ERROR: MethodError: no method matching zero(::Type{DateTime360Day})
The function `zero` exists, but no method is defined for this combination of argument types.   

Closest candidates are:
  zero(::Type{Union{}}, Any...)
   @ Base number.jl:310
  zero(::Type{Time})
   @ Dates C:\Users\rafael.schouten\.julia\juliaup\julia-1.11.2+0.x64.w64.mingw32\share\julia\stdlib\v1.11\Dates\src\types.jl:460
  zero(::Type{LibGit2.GitHash})
   @ LibGit2 C:\Users\rafael.schouten\.julia\juliaup\julia-1.11.2+0.x64.w64.mingw32\share\julia\stdlib\v1.11\LibGit2\src\oid.jl:221
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

Should it just return Millisecond(0) ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant