Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Fixing leap year, year < 2000, optimising #9

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

Fixing leap year, year < 2000, optimising #9

wants to merge 22 commits into from

Conversation

Jorropo
Copy link

@Jorropo Jorropo commented Jul 4, 2018

The rule for leap year is not only if the year is divisible by for but :

For a simple pr review check in diff option : "hide white space"

@Jorropo Jorropo changed the title Fixing leap year, optimising Fixing leap year, year < 2000, optimising Jul 6, 2018
@Jorropo
Copy link
Author

Jorropo commented Jul 6, 2018

I have move my repo to github.com/Jorropo/ds3231/

@rodan
Copy link
Owner

rodan commented Jul 27, 2018

hello.

first of all thanks for your pull request.
indeed your leap year calculation is much more precise, but for the interval expected to be used by this library the unixtime is indeed properly calculated.

the minimum and maximum values expected for the year are 1970 (start of unixtime, since we don't support negative uint32_t) and 2032 - when unsigned uint32_t will overflow.

cheers,
peter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants