/* timetabs.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */

#include <limits.h>
#include <emx/time.h>

/* Day number, relative to 01-Jan-1970, of 01-Jan for the years 1970
   through 2106 */

int const _year_day[_YEARS+1] =
{
  0, 365, 730, 1096, 1461, 1826, 2191, 2557, 2922, 3287, 3652, 4018,
  4383, 4748, 5113, 5479, 5844, 6209, 6574, 6940, 7305, 7670, 8035,
  8401, 8766, 9131, 9496, 9862, 10227, 10592, 10957, 11323, 11688,
  12053, 12418, 12784, 13149, 13514, 13879, 14245, 14610, 14975,
  15340, 15706, 16071, 16436, 16801, 17167, 17532, 17897, 18262,
  18628, 18993, 19358, 19723, 20089, 20454, 20819, 21184, 21550,
  21915, 22280, 22645, 23011, 23376, 23741, 24106, 24472, 24837,
  25202, 25567, 25933, 26298, 26663, 27028, 27394, 27759, 28124,
  28489, 28855, 29220, 29585, 29950, 30316, 30681, 31046, 31411,
  31777, 32142, 32507, 32872, 33238, 33603, 33968, 34333, 34699,
  35064, 35429, 35794, 36160, 36525, 36890, 37255, 37621, 37986,
  38351, 38716, 39082, 39447, 39812, 40177, 40543, 40908, 41273,
  41638, 42004, 42369, 42734, 43099, 43465, 43830, 44195, 44560,
  44926, 45291, 45656, 46021, 46387, 46752, 47117, 47482, 47847,
  48212, 48577, 48942, 49308, 49673, INT_MAX
};


/* Day number, relative to 01-Jan, of day 01 for January through
   December. */

int const _month_day_non_leap[] = 
  {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, INT_MAX};

int const _month_day_leap[] = 
  {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, INT_MAX};
