Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add zero for TimeType #35554

Merged
merged 3 commits into from
Apr 23, 2020
Merged

Add zero for TimeType #35554

merged 3 commits into from
Apr 23, 2020

Conversation

matthieugomez
Copy link
Contributor

@matthieugomez matthieugomez commented Apr 22, 2020

According to docs, zero "gets the additive identity element for the type of x (x can also specify the
type itself).". Defining this method allows one to get the type of dt::T - dt::T in a generic way.

Add zero for `TimeType` (according to the docs, zero `Gets the additive identity element for the type of x (x can also specify the type itself)`).
Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkarrasch dkarrasch added the domain:dates Dates, times, and the Dates stdlib module label Apr 23, 2020
NEWS.md Outdated Show resolved Hide resolved
@JeffBezanson JeffBezanson merged commit 3a06a2e into JuliaLang:master Apr 23, 2020
nickrobinson251 added a commit to JuliaDiff/ChainRulesCore.jl that referenced this pull request Apr 27, 2020
- following JuliaLang/julia#35554
  which agrees with the point made here, but shows the
  given code to be misleading.
nickrobinson251 added a commit to JuliaDiff/ChainRulesCore.jl that referenced this pull request Apr 27, 2020
- following JuliaLang/julia#35554
  which agrees with the point made here, but shows the
  given code to be misleading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:dates Dates, times, and the Dates stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants