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

Re-define Unitful's yr (year) unit to be 365.2425 days #740

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 1, 2024

  1. Re-define Unitful's yr (year) unit to be 365.2425 days

    This is the true average number of days in the Gregorian year, every
    year that is exactly divisible by four is a leap year, except for
    years that are exactly divisible by 100, but these centurial years are
    leap years, if they are exactly divisible by 400.
    
    See `Dates.isleapyear`:
    https://github.com/JuliaLang/julia/blob/00739173/stdlib/Dates/src/types.jl#L206
    jakewilliami committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    2d47e89 View commit details
    Browse the repository at this point in the history
  2. Add test and note for Dates.days(::Year)

    The average number of days in a year should be the same in both
    Unitful and the Dates stdlib.
    
    We also add a reference to this function in the documentation for this
    unit.
    jakewilliami committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    119de57 View commit details
    Browse the repository at this point in the history