home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / dev / date-33.087.lha / Date-33.087 / src / Date.h < prev    next >
C/C++ Source or Header  |  1994-04-13  |  6KB  |  70 lines

  1. typedef short bool;
  2. #define true    1
  3. #define false    0
  4. typedef enum{dayerr,monday,tuesday,wednesday,thursday,freiday,saturday,sunday} Weekdays;
  5.  
  6. /* Module initialization */
  7. #ifndef __SASC_650
  8.   void _DateInit(void);
  9.   #undef __MakeLib
  10. #endif
  11.  
  12. #ifndef __MakeLib
  13.   bool JulianLeapYear(const int year);
  14.   bool GregorianLeapYear(const int year);
  15.   bool HeisLeapYear(const int year);
  16.   unsigned short JulianMonthDays(const unsigned short month, const int year);
  17.   unsigned short GregorianMonthDays(const unsigned short month, const int year);
  18.   unsigned short HeisMonthDays(const unsigned short month, const int year);
  19.   unsigned int JulianYearDays(const int year);
  20.   unsigned int GregorianYearDays(const int year);
  21.   unsigned int HeisYearDays(const int year);
  22.   bool JulianDaySmaller(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  23.   bool GregorianDaySmaller(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  24.   bool HeisDaySmaller(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  25.   bool JulianDayGreater(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  26.   bool GregorianDayGreater(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  27.   bool HeisDayGreater(const unsigned short day1, const unsigned short month1, const int year1, const unsigned short day2, const unsigned short month2, const int year2);
  28.   long JulianDayDiff(const unsigned short day1, unsigned short month1, int year1, const unsigned short day2, unsigned short month2, int year2);
  29.   long GregorianDayDiff(const unsigned short day1, unsigned short month1, int year1, const unsigned short day2, unsigned short month2, int year2);
  30.   long HeisDayDiff(const unsigned short day1, unsigned short month1, int year1, const unsigned short day2, unsigned short month2, int year2);
  31.   Weekdays JulianWeekday(const unsigned short day, unsigned short month, int year);
  32.   Weekdays GregorianWeekday(const unsigned short day, unsigned short month, int year);
  33.   Weekdays HeisWeekday(const unsigned short day, unsigned short month, int year);
  34.   unsigned short JulianDaysBeforeWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  35.   unsigned short GregorianDaysBeforeWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  36.   unsigned short HeisDaysBeforeWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  37.   unsigned short JulianDaysAfterWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  38.   unsigned short GregorianDaysAfterWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  39.   unsigned short HeisDaysAfterWeekday(const unsigned short day, const unsigned short month, const int year, const Weekdays weekday);
  40.   void JulianDiffDate(const unsigned short day, const unsigned short month, const int year, int days, unsigned short *dday, unsigned short *dmonth, int *dyear);
  41.   void GregorianDiffDate(const unsigned short day, const unsigned short month, const int year, int days, unsigned short *dday, unsigned short *dmonth, int *dyear);
  42.   void HeisDiffDate(const unsigned short day, const unsigned short month, const int year, int days, unsigned short *dday, unsigned short *dmonth, int *dyear);
  43.   unsigned int JYearToScaliger(const int year);
  44.   unsigned int GYearToScaliger(const int year);
  45.   unsigned int HYearToScaliger(const int year);
  46.   int ScaligerYearToJ(const unsigned int syear);
  47.   int ScaligerYearToG(const unsigned int syear);
  48.   int ScaligerYearToH(const unsigned int syear);
  49.   unsigned long JSYearToJD(const unsigned int syear);
  50.   unsigned long GSYearToJD(const unsigned int syear);
  51.   unsigned long HSYearToJD(const unsigned int syear);
  52.   unsigned long JDtoMJD(const unsigned long jd);
  53.   unsigned long MJDtoJD(const unsigned long mjd);
  54.   unsigned long JulianToJD(const unsigned short day, const unsigned short month, const int year);
  55.   unsigned long GregorianToJD(const unsigned short day, const unsigned short month, const int year);
  56.   unsigned long HeisToJD(const unsigned short day, const unsigned short month, const int year);
  57.   float TimeToJD(const unsigned short hour, const unsigned short min, const unsigned short sec);
  58.   void JDToTime(float jd, unsigned short *rhour, unsigned short *rmin, unsigned short *rsec);
  59.   unsigned short GregorianMoonAge(const unsigned short day, const unsigned short month, const int year);
  60.   void GregorianEaster(const int year, unsigned short *dday, unsigned short *dmonth);
  61.   short TimeZoneFactor(const short degree);
  62.   long LMT(const unsigned long secs, const float meridiandegree, const float posdegree);
  63.   unsigned long TimeToSec(const unsigned short hour, const unsigned short min, const unsigned short sec);
  64.   void SecToTime(unsigned long secs, unsigned short *hour, unsigned short *min, unsigned short *sec);
  65.   unsigned short JulianWeek(const unsigned short day, const unsigned short month, const int year);
  66.   unsigned short GregorianWeek(const unsigned short day, const unsigned short month, const int year);
  67.   unsigned short HeisWeek(const unsigned short day, const unsigned short month, const int year);
  68. #else
  69. #endif
  70.