Exemplo n.º 1
0
static int32_t FX_DaysBeforeMonthInYear(int32_t iYear, uint8_t iMonth) {
  FXSYS_assert(iYear != 0);
  FXSYS_assert(iMonth >= 1 && iMonth <= 12);
  const int32_t* p =
      FX_IsLeapYear(iYear) ? g_FXDaysBeforeLeapMonth : g_FXDaysBeforeMonth;
  return p[iMonth - 1];
}
Exemplo n.º 2
0
uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth) {
  FXSYS_assert(iYear != 0);
  FXSYS_assert(iMonth >= 1 && iMonth <= 12);
  const uint8_t* p =
      FX_IsLeapYear(iYear) ? g_FXDaysPerLeapMonth : g_FXDaysPerMonth;
  return p[iMonth - 1];
}
Exemplo n.º 3
0
int32_t FX_DaysInYear(int32_t iYear) {
  FXSYS_assert(iYear != 0);
  return FX_IsLeapYear(iYear) ? g_FXDaysPerLeapYear : g_FXDaysPerYear;
}
Exemplo n.º 4
0
int32_t FX_DaysInYear(int32_t iYear) {
  ASSERT(iYear != 0);
  return FX_IsLeapYear(iYear) ? g_FXDaysPerLeapYear : g_FXDaysPerYear;
}