File tree 2 files changed +2
-0
lines changed
2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ void WatchFaceCasioStyleG7710::Refresh() {
276
276
std::chrono::system_clock::to_time_t (std::chrono::time_point_cast<std::chrono::system_clock::duration>(currentDateTime.Get ()));
277
277
tm * tmTime = std::localtime (&ttTime);
278
278
279
+ // TODO: When we start using C++20, use std::chrono::year::is_leap
279
280
int daysInCurrentYear = (year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 ? 366 : 365 ;
280
281
uint16_t daysTillEndOfYearNumber = daysInCurrentYear - dayOfYear;
281
282
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ namespace {
28
28
int MaximumDayOfMonth (uint8_t month, uint16_t year) {
29
29
switch (month) {
30
30
case 2 : {
31
+ // TODO: When we start using C++20, use std::chrono::year::is_leap
31
32
if ((((year % 4 ) == 0 ) && ((year % 100 ) != 0 )) || ((year % 400 ) == 0 )) {
32
33
return 29 ;
33
34
}
You can’t perform that action at this time.
0 commit comments