diff options
author | YamaArashi <shadow962@live.com> | 2016-12-29 13:13:07 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-12-29 13:13:07 -0800 |
commit | b42f5c0f7fc9ac0161a6b6e2d764911ef375d040 (patch) | |
tree | 295e46c51b25e9e85f35f9e7a7e26395b40b77be /src/rtc.c | |
parent | 0edc7cbd88b31a6e57608810182781b6cf31b85a (diff) |
use BUGFIX ifdefs
Diffstat (limited to 'src/rtc.c')
-rw-r--r-- | src/rtc.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -63,9 +63,8 @@ u16 ConvertDateToDayCount(u8 year, u8 month, u8 day) s32 i; u16 dayCount = 0; -#if (REVISION < 2) - // Revisions 0 and 1 don't add days for the year 2000, - // causing the berry glitch. +#ifndef BUGFIX_BERRY + // The berry glitch was caused by not adding days for the year 2000. for (i = year - 1; i > 0; i--) { dayCount += 365; @@ -74,8 +73,7 @@ u16 ConvertDateToDayCount(u8 year, u8 month, u8 day) dayCount++; } #else - // Revision 2 has "i >= 0" as the condition instead of "i > 0", - // which fixes the issue. + // The fix was to use "i >= 0" as the condition instead of "i > 0". for (i = year - 1; i >= 0; i--) { dayCount += 365; @@ -83,7 +81,7 @@ u16 ConvertDateToDayCount(u8 year, u8 month, u8 day) if (IsLeapYear(i) == TRUE) dayCount++; } -#endif +#endif // BUGFIX_BERRY for (i = 0; i < month - 1; i++) dayCount += sNumDaysInMonths[i]; |