| 352,16 → 352,7 |
| { |
| byte day = clock__currentTime.day(); |
| day = (day + 1 <= CLOCK__DAY_MAX) ? (day + 1) : CLOCK__DAY_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| day, |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setDay(day); |
| } |
| break; |
| |
| 369,16 → 360,7 |
| { |
| byte month = clock__currentTime.month(); |
| month = (month + 1 <= CLOCK__MONTH_MAX) ? (month + 1) : CLOCK__MONTH_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| month, |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setMonth(month); |
| } |
| break; |
| |
| 386,16 → 368,7 |
| { |
| word year = clock__currentTime.year(); |
| year = (year + 1 <= CLOCK__YEAR_MAX) ? (year + 1) : CLOCK__YEAR_MIN; |
| DateTime tempTime |
| ( |
| year, |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setYear(year); |
| } |
| break; |
| |
| 403,16 → 376,7 |
| { |
| byte hour = clock__currentTime.hour(); |
| hour = (hour + 1 <= CLOCK__HOUR_MAX) ? (hour + 1) : CLOCK__HOUR_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| hour, |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setHour(hour); |
| } |
| break; |
| |
| 420,16 → 384,7 |
| { |
| byte minute = clock__currentTime.minute(); |
| minute = (minute + 1 <= CLOCK__MINUTE_MAX) ? (minute + 1) : CLOCK__MINUTE_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| minute, |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setMinute(minute); |
| } |
| break; |
| |
| 437,16 → 392,7 |
| { |
| byte second = clock__currentTime.second(); |
| second = (second + 1 <= CLOCK__SECOND_MAX) ? (second + 1) : CLOCK__SECOND_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| second |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setSecond(second); |
| } |
| break; |
| |
| 471,16 → 417,7 |
| { |
| byte day = clock__currentTime.day(); |
| day = (day - 1 >= CLOCK__DAY_MIN) ? (day - 1) : CLOCK__DAY_MAX; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| day, |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setDay(day); |
| } |
| break; |
| |
| 488,16 → 425,7 |
| { |
| byte month = clock__currentTime.month(); |
| month = (month - 1 >= CLOCK__MONTH_MIN) ? (month - 1) : CLOCK__MONTH_MAX; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| month, |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setMonth(month); |
| } |
| break; |
| |
| 505,16 → 433,7 |
| { |
| word year = clock__currentTime.year(); |
| year = (year - 1 >= CLOCK__YEAR_MIN) ? (year - 1) : CLOCK__YEAR_MAX; |
| DateTime tempTime |
| ( |
| year, |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setYear(year); |
| } |
| break; |
| |
| 522,16 → 441,7 |
| { |
| byte hour = clock__currentTime.hour(); |
| hour = (hour - 1 >= CLOCK__HOUR_MIN) ? (hour - 1) : CLOCK__HOUR_MIN; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| hour, |
| clock__currentTime.minute(), |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setHour(hour); |
| } |
| break; |
| |
| 539,16 → 449,7 |
| { |
| byte minute = clock__currentTime.minute(); |
| minute = (minute - 1 >= CLOCK__MINUTE_MIN) ? (minute - 1) : CLOCK__MINUTE_MAX; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| minute, |
| clock__currentTime.second() |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setMinute(minute); |
| } |
| break; |
| |
| 556,16 → 457,7 |
| { |
| byte second = clock__currentTime.second(); |
| second = (second - 1 >= CLOCK__SECOND_MIN) ? (second - 1) : CLOCK__SECOND_MAX; |
| DateTime tempTime |
| ( |
| clock__currentTime.year(), |
| clock__currentTime.month(), |
| clock__currentTime.day(), |
| clock__currentTime.hour(), |
| clock__currentTime.minute(), |
| second |
| ); |
| clock__currentTime = tempTime; |
| clock__currentTime.setSecond(second); |
| } |
| break; |
| |