MCPcopy Create free account
hub / github.com/chen3feng/toft / AdjustMonthLimit

Method AdjustMonthLimit

system/time/date.cpp:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void Date::AdjustMonthLimit() {
25 if (m_month == 2 && m_day > 28) {
26 int days = DaysInMonth(m_year, m_month);
27 if (m_day > days)
28 m_day = days;
29 }
30}
31
32bool Date::Set(int year, int month, int day) {
33 if (!IsValid(year, month, day))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected