ecma_date_day_from_year (int32_t year) /**< year value */
{
  if (JERRY_LIKELY (year >= 1970))
  {
    return (int32_t) (365 * (year - 1970)
                      + ((year - 1969) / 4)
                      - ((year - 1901) / 100)
                      + ((year - 1601) / 400));
  }

  return (int32_t) (365 * (year - 1970)
                    + floor ((year - 1969) / 4.0)
                    - floor ((year - 1901) / 100.0)
                    + floor ((year - 1601) / 400.0));
} /* ecma_date_day_from_year */
ecma_date_day_from_year (int32_t year)  
{
  if (JERRY_LIKELY (year >= 1970))
  {
    return (int32_t) (365 * (year - 1970)
                      + ((year - 1969) / 4)
                      - ((year - 1901) / 100)
                      + ((year - 1601) / 400));
  }

  return (int32_t) (365 * (year - 1970)
                    + floor ((year - 1969) / 4.0)
                    - floor ((year - 1901) / 100.0)
                    + floor ((year - 1601) / 400.0));
}  