Split date types into calendar and economy dates

See: 735abfe1
This commit is contained in:
Jonathan G Rennison
2024-02-13 21:34:09 +00:00
parent fad5ee56e7
commit 7ce06e22b8
141 changed files with 1325 additions and 1082 deletions

View File

@@ -2407,10 +2407,10 @@ int GetTraceRestrictTimeDateValue(TraceRestrictTimeDateValueField type)
return now.ClockHHMM();
case TRTDVF_DAY:
return _cur_date_ymd.day;
return CalTime::CurDay();
case TRTDVF_MONTH:
return _cur_date_ymd.month + 1;
return CalTime::CurMonth() + 1;
default:
return 0;
@@ -2432,12 +2432,12 @@ int GetTraceRestrictTimeDateValueFromStateTicks(TraceRestrictTimeDateValueField
return minutes.ClockHHMM();
case TRTDVF_DAY: {
YearMonthDay ymd = ConvertDateToYMD(StateTicksToDate(state_ticks));
CalTime::YearMonthDay ymd = CalTime::ConvertDateToYMD(StateTicksToCalendarDate(state_ticks));
return ymd.day;
}
case TRTDVF_MONTH: {
YearMonthDay ymd = ConvertDateToYMD(StateTicksToDate(state_ticks));
CalTime::YearMonthDay ymd = CalTime::ConvertDateToYMD(StateTicksToCalendarDate(state_ticks));
return ymd.month + 1;
}