static inline MAPM referenceDateTime(const MAPM &MM, bool hasTimezone, const Timezone::Ptr &timezone) { MAPM result = DateUtils::convertDMY2Absolute(DateUtils::maximumDayInMonthFor(1972, MM), MM, 1972) * DateUtils::g_secondsPerDay; if(hasTimezone) { result -= timezone->asSeconds(); } return result; }
static inline MAPM referenceDateTime(const MAPM &YY, bool hasTimezone, const Timezone::Ptr &timezone) { MAPM result = DateUtils::convertDMY2Absolute(1, 1, YY) * DateUtils::g_secondsPerDay; if(hasTimezone) { result -= timezone->asSeconds(); } return result; }