home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / dev / Libraries / Date / doc / Date.doc < prev    next >
Encoding:
Text File  |  1995-07-31  |  87.6 KB  |  3,631 lines

  1. TABLE OF CONTENTS
  2.  
  3. Date/--announce--
  4. Date/--background--
  5. Date/--compiling--
  6. Date/--history--
  7. Date/--release--
  8. Date/--todo--
  9. Date/_DateCleanup
  10. Date/_DateInit
  11. Date/Compare2Dates
  12. Date/Compare2Times
  13. Date/DateText
  14. Date/DiffTime
  15. Date/GregorianDayDiff
  16. Date/GregorianDaysAfterWeekday
  17. Date/GregorianDaysBeforeWeekday
  18. Date/GregorianDiffDate
  19. Date/GregorianEaster
  20. Date/GregorianLeapYear
  21. Date/GregorianMonthDays
  22. Date/GregorianMoonAge
  23. Date/GregorianMoonPhase
  24. Date/GregorianToJD
  25. Date/GregorianWeek
  26. Date/GregorianWeekday
  27. Date/GregorianYearDays
  28. Date/GSYearToJD
  29. Date/GYearToScaliger
  30. Date/HeisDayDiff
  31. Date/HeisDaysAfterWeekday
  32. Date/HeisDaysBeforeWeekday
  33. Date/HeisDiffDate
  34. Date/HeisEaster
  35. Date/HeisLeapYear
  36. Date/HeisMonthDays
  37. Date/HeisToJD
  38. Date/HeisWeek
  39. Date/HeisWeekday
  40. Date/HeisYearDays
  41. Date/HSYearToJD
  42. Date/HYearToScaliger
  43. Date/JDToGregorian
  44. Date/JDToHeis
  45. Date/JDToJulian
  46. Date/JDtoMJD
  47. Date/JDToTime
  48. Date/JSYearToJD
  49. Date/JulianDayDiff
  50. Date/JulianDaysAfterWeekday
  51. Date/JulianDaysBeforeWeekday
  52. Date/JulianDiffDate
  53. Date/JulianEaster
  54. Date/JulianLeapYear
  55. Date/JulianMonthDays
  56. Date/JulianToJD
  57. Date/JulianWeek
  58. Date/JulianWeekday
  59. Date/JulianYearDays
  60. Date/JYearToScaliger
  61. Date/LMT
  62. Date/MJDtoJD
  63. Date/MonthShortText
  64. Date/MonthText
  65. Date/ScaligerYearToG
  66. Date/ScaligerYearToH
  67. Date/ScaligerYearToJ
  68. Date/SecToTime
  69. Date/SetCountry
  70. Date/TimeDiff
  71. Date/TimeToJD
  72. Date/TimeToSec
  73. Date/TimeZoneFactor
  74. Date/ValidGregorianDate
  75. Date/ValidHeisDate
  76. Date/ValidJulianDate
  77. Date/ValidTime
  78. Date/WeekdayShortText
  79. Date/WeekdayText
  80. Date/--announce--                                           Date/--announce--
  81.  
  82.    TITLE
  83.     date.library
  84.  
  85.    VERSION
  86.     33.158
  87.  
  88.    RELEASE DATE
  89.     01.08.1995
  90.  
  91.    AUTHOR
  92.     Kai Hofmann (i07m@zfn.uni-bremen.de)
  93.                 (http://www.informatik.uni-bremen.de/~i07m)
  94.  
  95.    DESCRIPTION
  96.     A portable ANSI-C/C++ library that gives you low level functions for
  97.     date calculations.
  98.     Includes the following features:
  99.  
  100.     - Support for six different date/time measurement systems:
  101.       Julian, Gregorian, Heis, Julian Day, Modified Julian Day,
  102.       Scaliger Year (other systems will follow).
  103.     - Month/Weekday and other date/time string support for 12 languages.
  104.     - Support for different countries (implementation not finished!).
  105.     - Calculating leap years.
  106.     - Functions to calculate the days of a month or a year or between
  107.       two dates.
  108.     - Functions to calculate the weeknumber and the weekday.
  109.     - Check the validity of a date.
  110.     - Calculating Easter.
  111.     - Comparing dates.
  112.     - Powerfull functions to handle differences between dates.
  113.     - Transformations from one time measurement system to the others.
  114.     - Calculating your local time zone out of your position on the earth.
  115.     - Calculating the age of the moon and the moon phase.
  116.     - Check the validity of a time.
  117.     - Comparing times.
  118.     - Transforming 24h time format into seconds and back.
  119.     - Transforming 24h time format to Julian Day time format and back.
  120.     - Powerfull textengine for creating date/time strings in different
  121.       languages, that supports nearly all features of the date library.
  122.     - A C++ class concept, which makes it very easy to use the complex
  123.       functionality of the date library.
  124.     - Autodoc describing all functions in the library.
  125.     - Including ANSI-C/C++ sources and test example.
  126.  
  127.    NEW FEATURES
  128.     - Better code
  129.     - Bug fixes
  130.     - More C++ support
  131.     - Fixing type conversion bugs
  132.     - Better Autodocs
  133.     - Supporting more languages
  134.     - Functions for checking validity of dates/times
  135.     - Julian calendar is stable since 8 and NOT since -7!
  136.     - Textengine
  137.     - DateClass (basic concept)
  138.  
  139.    SPECIAL REQUIREMENTS
  140.     ANSI-C or/and C++ Compiler.
  141.  
  142.    AVAILABILITY
  143.     ftp://wuarchive.wustl.edu/pub/aminet/dev/c/date.lha
  144.     And all other Aminet sites.
  145.  
  146.     ftp://OAK.Oakland.Edu/pub/SimTel/msdos/c/kh-date.zip
  147.     And all other SimTel sites.
  148.  
  149.     Actual beta versions (for all systems) are available from:
  150.     ftp://ftp.uni-bremen.de/pub/amiga/date/
  151.  
  152.    PRICE
  153.     For NON-COMMERCIAL USE this is Giftware!
  154.     (Non-commercial includes Giftware and Shareware!)
  155.  
  156.     Permission for COMMERCIAL USE is only given by an extra available
  157.     commercial license that must be validated!
  158.     Contact me directly for this license, because it will be individually
  159.     handed out per your needs!
  160.  
  161.     But in both cases you have to follow the two guidelines below:
  162.  
  163.     1) You *must* include the following notice in your product and in
  164.        your documentation:
  165.        "This software uses the date library that is copyrighted 1994-95
  166.         by Kai Hofmann"
  167.  
  168.     2) You "must" send me a full version of your product at no cost
  169.        including free updates!
  170.  
  171.    DISTRIBUTION
  172.     You can copy and distribute this library as long as you do not take
  173.     more than $5 for one disk or $40 for one CD!
  174.  
  175. Date/--background--                                       Date/--background--
  176.  
  177.    NAME
  178.     Date -- This module was designed in helping calc.calendar dates (V33)
  179.  
  180.    FUNCTION
  181.     This module has been designed to become a useful and portable library
  182.     and to help developers calculate calendar dates!
  183.  
  184.    NOTES
  185.     A tropical year is 365.2422 days! / 365d, 5h, 48min, 46sec
  186.     A moon month is 29.53059 days! / 29d, 12h, 44min, 2.9 sec
  187.     A moon phase is 7.38265 days!
  188.     The calculations are historical and NOT astronomical!
  189.  
  190.     (German) Books which were consulted in creating this library:
  191.         Kleine Naturwissenschaftliche Bibliothek, Band 23
  192.         Ewige Kalender
  193.         A.W. Butkewitsch & M.S. Selikson
  194.         5. Auflage
  195.         Teubner, Leipzig 1974
  196.         ISBN 3-322-00393-0
  197.  
  198.         Tag und Woche, Monat und Jahr: eine Kulturgeschichte des
  199.         Kalenders
  200.         Rudolf Wendorff
  201.         Westdeutscher, Opladen 1993
  202.         ISBN 3-531-12417-X
  203.  
  204.         Kalender und Chronologie: Bekanntes & Unbekanntes aus der
  205.         Kalenderwissenschaft
  206.         Heinz Zemanek
  207.         4. Auflage
  208.         Oldenbourg, München 1987
  209.         ISBN 3-486-20447-5
  210.  
  211.         Meyers Handbuch
  212.         über das Weltall
  213.         Karl Schaifers & Gerhard Traving
  214.         5. Auflage
  215.         Bibliographisches Institut, Mannheim 1973
  216.         ISBN 3-411-00940-3
  217.  
  218.         Astronomische Algorithmen
  219.         Jean Meeus
  220.         2. Auflage
  221.         Johann Ambrosius Barth, Berlin 1994
  222.         ISBN 3-335-00400-0
  223.  
  224.         Astronomie mit dem Personal Computer
  225.         Oliver Montenbruck & Thomas Pfleger
  226.         2. Auflage
  227.         Springer, Berlin 1994
  228.         ISBN 3-540-57701-7
  229.  
  230.         Handbuch der mathematischen und technischen Chronologie
  231.         Das Zeitrechnungswesen der Völker
  232.         Band I
  233.         F. K. Ginzel
  234.         1. Auflage
  235.         J. C. Hinrichs'sche Buchhandlung, Leipzig 1906
  236.  
  237.         Handbuch der mathematischen und technischen Chronologie
  238.         Das Zeitrechnungswesen der Völker
  239.         Band II
  240.         F. K. Ginzel
  241.         1. Auflage
  242.         J. C. Hinrichs'sche Buchhandlung, Leipzig 1911
  243.  
  244.         Handbuch der mathematischen und technischen Chronologie
  245.         Das Zeitrechnungswesen der Völker
  246.         Band III
  247.         F. K. Ginzel
  248.         1. Auflage
  249.         J. C. Hinrichs'sche Buchhandlung, Leipzig 1914
  250.  
  251.     (English) Books which were consulted in creating this library:
  252.         Mathematical Astronomy with a Pocket Calculator
  253.         Aubrey Jones Fras
  254.         Unknown (first) Edition
  255.         David & Charles Newton Abbot, London 1978
  256.         ISBN 0-7153-7675-6
  257.  
  258.         Astronomical Algorithms
  259.         Jean Meeus
  260.         Unknown Edition (I use the German second edition ;-)
  261.         Willmann-Bell, Inc., Ruchmond, Virginia (USA) 1991
  262.         ISBN 0-943396-35-2
  263.  
  264.    COPYRIGHT
  265.     This software is copyrighted 1994-95 by Kai Hofmann.
  266.     All rights reserved!
  267.  
  268.     - Permission for COMMERCIAL USE is only given by an extra available
  269.       commercial license that must be validated!
  270.       Contact me directly for this license, because it will be
  271.       individually handed out per your needs!
  272.  
  273.     - Permission is hereby granted, without written agreement and without
  274.       license, to USE this software and its documentation for any
  275.       NON-COMMERCIAL purpose, provided that the above copyright notice
  276.       and the following paragraph appear in all copies of this software
  277.       (Non-commercial includes Giftware and Shareware!).
  278.  
  279.       You *must* include the following notice in your product and in your
  280.       documentation:
  281.       "This software uses the date library that is copyrighted 1994-95 by
  282.        Kai Hofmann"
  283.  
  284.       You "must" send me a full version of your product at no cost
  285.       including free updates!
  286.       Extra money is welcome (For Bank Account see below - but *ONLY*
  287.       send in DM to this Bank Account!).
  288.  
  289.     - THERE IS *NO PERMISSION* GIVEN TO MODIFY THIS SOFTWARE!
  290.  
  291.       If you need only parts of this software, you should not worry,
  292.       because it's the job of the optimizer from your C compiler to
  293.       include only the needed parts in your executable!
  294.  
  295.    DISCLAIMER
  296.     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
  297.     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  298.     HOLDER AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  299.     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
  300.     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  301.     A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
  302.     PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
  303.     DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
  304.     CORRECTION.
  305.  
  306.     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  307.     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE
  308.     THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  309.     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
  310.     ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING
  311.     BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
  312.     LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
  313.     TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
  314.     PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  315.  
  316.     THE AUTHOR HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
  317.     UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  318.  
  319.    DISTRIBUTION
  320.     Permission is hereby granted, without written agreement and without
  321.     license or royalty fees, to copy and distribute this software and its
  322.     documentation for any purpose, provided that the above copyright
  323.     notice and the following paragraphs appear in all copies of this
  324.     software, to:
  325.     - All who will distribute this software for free!
  326.     - All free accessible INTERNET servers and PHONE boxes!
  327.     - All Aminet sites
  328.     - All SimTel sites
  329.     - Fred Fish for his great Amiga-Software-Library
  330.     - The German SAAR AG PD-Library
  331.     - All others who do NOT take more than $5.- for one disk that
  332.       includes this software!
  333.     - ALL others who do NOT take more than $40.- for one CD that includes
  334.       this software!
  335.  
  336.    ADDITIONAL INFORMATIONS
  337.     I have tried to make portable/useful and I hope bugfree software
  338.     for eternity - but this seems to be impossible (sorry!) :)
  339.     So I hope you will pay a fee for this.
  340.  
  341.     Kindly send US - dollars to a friend of mine in the USA who will
  342.     forward it to me in a timely manner.  Please send checks or money
  343.     orders only.
  344.     Contact me via email for more!
  345.  
  346.    AUTHOR
  347.     Kai Hofmann
  348.     Arberger Heerstraße 92
  349.     28307 Bremen
  350.     Germany
  351.  
  352.     Phone: (+49)-(0)421/480780
  353.            (Remember that my parents don't speak english!)
  354.     EMail: i07m@zfn.uni-bremen.de
  355.            i07m@informatik.uni-bremen.de
  356.     IRC  : PowerStat@#AmigaGer
  357.     WWW  : http://www.informatik.uni-bremen.de/~i07m
  358.  
  359.     Bank account : 1203 7503
  360.     Account owner: Kai Hofmann
  361.     Bank code    : 290 501 01
  362.     Bank name    : Sparkasse in Bremen/Germany
  363.  
  364.     THANKS
  365.     Thank you's are going to the following people:
  366.     Daniel Amor        - For his hint about the Oberon-2 SHORT
  367.                   command
  368.     Rita Reichl        - For correcting my bad english (very often)
  369.                   and for the three magic books *kiss*
  370.     Jim Rickman        - For reporting a bug
  371.     Christian Schaefer    - For spending time on this lib with his
  372.                   Borland C++ 4.5 compiler
  373.     Heinz Zemanek        - For his great book
  374.     Jacco van Weert &
  375.     Frans Slothouber    - For the 'Robodoc' utility
  376.     James Cooper and the
  377.     other Amiga people at
  378.     SAS Intitute        - For spending their unpaid free time with
  379.                   continuation of the Amiga SAS C/C++
  380.                   support :)
  381.  
  382. Date/--compiling--                                         Date/--compiling--
  383.  
  384.    NAME
  385.     compiling -- Specials for compiling the date library.
  386.  
  387.    COMPILING
  388.     - You could compile this code as normal C or as C++
  389.     - _AMIGA, __SASC_650, __MakeLib are Amiga only pp defines!
  390.     - _ISO8859_Latin1 should be defined if your system supports this
  391.       font encoding technology!
  392.     - Date_Time.c will be included automatically!
  393.  
  394. Date/--history--                                             Date/--history--
  395.  
  396.    NAME
  397.     history -- This is the development history of the Date module
  398.  
  399.    VERSION
  400.     $VER: Date 33.158 (29.07.95)
  401.  
  402.    HISTORY
  403.     16.01.1994 -    Procedures: JulianLeapYear(), GregorianLeapYear() &
  404.             HeisLeapYear() initiated.
  405.     22.01.1994 -    Procedures: JulianMonthDays(), GregorianMonthDays(),
  406.             HeisMonthDays(), JulianYearDays(),
  407.             GregorianYearDays(), HeisYearDays(), JulianDayDiff(),
  408.             GregorianDayDiff(), HeisDayDiff(),
  409.             JulianDaySmaller(), GregorianDaySmaller(),
  410.             HeisDaySmaller(), JulianWeekday(),
  411.             GregorianWeekday(), HeisWeekday(),
  412.             JulianDaysBeforeWeekday(),
  413.             GregorianDaysBeforeWeekday(),
  414.             HeisDaysBeforeWeekday(), JulianDaysAfterWeekday(),
  415.             GregorianDaysAfterWeekday(), HeisDaysAfterWeekday(),
  416.             JulianDiffDate(), FreeDate() initiated.
  417.             Types: Weekdays, Date, DatePtr initiated.
  418.             Vars of Gregorian reform initiated
  419.             (for changing to different countries)
  420.     23.01.1994 -    Procedures: JulianDiffDate() finished,
  421.             GregorianDiffDate(), HeisDiffDate(),
  422.             JYearToScaliger(), GYearToScaliger(),
  423.             HYearToScaliger(), ScaligerYearToJ(),
  424.             ScaligerYearToG(), ScaligerYearToH(), JSYearToJD(),
  425.             GSYearToJD(), HSYearToJD(), JDtoMJD(), MJDtoJD(),
  426.             JulianToJD(), GregorianToJD(), HeisToJD(),
  427.             TimeToJD(), JDToTime(), FreeTime() initiated.
  428.             Types: Time, TimePtr initiated.
  429.     28.01.1994 -    Procedures: GregorianMoonAge(), MoonMonthAge(),
  430.             GregorianEaster() initiated.
  431.     30.01.1994 -    Procedures: JulianDiffDate(), GregorianDiffDate(),
  432.             HeisDiffDate(), JDToTime(), GregorianEaster() edited
  433.             (changing return value from ptr to VAL variables).
  434.             Procedures: FreeDate(), FreeTime() deleted.
  435.             Types: Date, DatePtr, Time, TimePtr deleted (not
  436.             longer needed, because of the procedure changes).
  437.             Procedures: GregorianMoonAge(), GregorianEaster()
  438.             changed    year parameter from CARDINAL to INTEGER
  439.             (this is more consistent to the rest of the library).
  440.             Bugs removed: GregorianWeekday(), HeisWeekday()
  441.             (before removing, the weekday for leapyears was
  442.             wrong)
  443.             Procedure: GregorianEaster() finished.
  444.             Ported to Oberon-2
  445.     31.01.1994 -    Compiled with Oberon-2 V3.11
  446.     12.02.1994 -    Procedures: TimeZoneFactor(), LMT(), TimeToSec(),
  447.             SecToTime() initiated.
  448.             Version-String installed :)
  449.             Starting translation to SAS C 6.51:
  450.             Date.h translated
  451.     13.02.1994 -    Continuation of C translation
  452.     17.02.1994 -    New Oberon-2 Port, because Daniel Amor gave me a
  453.             small hint about the SHORT command
  454.             (I did not know about this!)
  455.             Small bug in Autodocs removed
  456.             making this text as Date/--history-- autodoc
  457.             Continuation of C translation
  458.     18.02.1994 -    Finished with C translation
  459.     19.02.1994 -    C bugs removed (thanks to SAS for helping a
  460.             C greenhorn like me!), some optimizations done also.
  461.             Oberon-2 version compiled with V40.17 includes
  462.     21.02.1994 -    Starting to write Modula-II testmodule
  463.             Vars for the begining of Heis calculation initiated.
  464.             Fixed small bugs in GregorianWeekday(),
  465.             HeisWeekday(), TimeToSec(), SecToTime()
  466.             Return-value of LMT() changed to LONGINT!
  467.             Converting testmodule to Oberon-2
  468.     22.02.1994 -    Converting testmodule to C
  469.     23.02.1994 -    I noticed, that I forgot the 3 functions
  470.             JulianWeek(), GregorianWeek(), HeisWeek()
  471.     24.02.1994 -    Initiated the 3 forgotten functions
  472.     26.02.1994 -    Initiating new GregorianEaster() with
  473.             Gauß-algorithms    but ONLY for 1900-2099!
  474.     27.02.1994 -    Bug fixed in JulianWeekday()
  475.             Bugs fixed in JulianDayDiff(), GregorianDayDiff(),
  476.             HeisDayDiff()
  477.             JulianDayGreater(), GregorianDayGreater(),
  478.             HeisDayGreater() Initiated.
  479.     02.03.1994 -    Small bug fixed in HeisDayDiff()
  480.             Bugs from 27.02. fixed in Modula-II and Oberon-2
  481.             versions
  482.             I found the way to extend GregorianEaster() !
  483.             Small bug fixed in JulianWeek(), GregorianWeek(),
  484.             HeisWeek() (~(M2) is not !(C))
  485.     05.03.1994 -    Some internal bugs removed
  486.             New internal procedures GregorianSB(),
  487.             GregorianJHSB(), GregorianJHStartSB() !
  488.             Extending GregorianEaster() :)
  489.     11.03.1994 -    Things from 05.03. done in Modula-II and Oberon
  490.     12.03.1994 -    If __SASC is defined autoinitialization instead of
  491.             _DateInit() will be used!
  492.     13.03.1994 -    After studying the SAS C Manual again I decided to
  493.             check for __SASC_650 instead of __SASC because of
  494.             the available priorities!
  495.             Setting the priority of _DateInit() for
  496.             autoinitialization to 600!
  497.     15.03.1994 -    Making Date as library
  498.     16.03.1994 -    Some work on the Autodocs was done,
  499.             eliminating OldGregorianEaster() by comments
  500.             (ANSI: STOP bad standards like that there are NO
  501.              nested comments possible in C!!!).
  502.     19.03.1994 -    Some work on the Autodocs was done in the M2 Code.
  503.     20.03.1994 -    Some work on the Autodocs was done in the Oberon Code
  504.     22.03.1994 -    In JDtoMJD(), MJDtoJD() an L was added to the
  505.             constant.
  506.             In GregorianWeekday(), HeisWeekday(),
  507.             JulianDiffDate(), GregorianDiffDate(),
  508.             HeisDiffDate(), JDToTime() I have inserted
  509.             conversions (found with Borland C++ 4.0).
  510.     24.03.1994 -    Making SunOS4.1.3, SunOS5.3(Solaris2.3) &
  511.             RS6000 AIX3.2.? binaries with gcc.
  512.             Eliminating nested commends by inserting a space
  513.             between / and * (I hate this ANSI C standard
  514.             feature for commends :(
  515.     27.03.1994 -    Adding library register assignments to the autodocs.
  516.     03.04.1994 -    Small fixes for the SAS C++ Compiler
  517.             Small bug fixed in the M2 version of
  518.             GregorianEaster()
  519.     04.04.1994 -    Adding some 'static' keywords.
  520.     10.04.1994 -    Changing from Shareware to Gift Ware ;-)
  521.     02.08.1994 -    Small fixes in the Autodocs (thanks to Rita Reichl
  522.             for correcting my bad english ;-)
  523.     11.08.1994 -    Again small fixes in the Autodocs!
  524.     13.11.1994 -    Small fix in JulianWeek(),GregorianWeek(),HeisWeek().
  525.             Thanks to Jim Rickman for reporting the bug!
  526.             Small changes in the Autodocs!
  527.     30.11.1994 -    Fix the bug from 13.11. in M2 and Oberon code.
  528.     04.12.1994 -    Small fixes in the C-Autodocs.
  529.     12.12.1994 -    Adding WeekdayText(), MonthText() and internal
  530.             max().
  531.     13.12.1994 -    Optimizing WeekdayText() and MonthText()
  532.     14.12.1994 -    Adding WeekdayShortText() and MonthShortText(),
  533.             and fixing the french text.
  534.     17.12.1994 -    Two small changes in the copyright conditions!
  535.     18.12.1994 -    Fix for Amiga init library
  536.     10.01.1995 -    Installing TurboText 2.0
  537.     11.01.1995 -    Found a new (German) book!
  538.     13.01.1995 -    Introducing release history
  539.     14.01.1995 -    Introducing to do list
  540.     15.01.1995 -    Procedures: JDToJulian(), JDToGregorian(),
  541.             JDToHeis() as dummy, JulianEaster() initiated.
  542.             Procedure: OldGregorianEaster() removed.
  543.             Initiating an alternate GregorianEaster() and a
  544.             dummy HeisEaster().
  545.     16.01.1995 -    Procedure: GregorianMoonPhase initiated.
  546.             I decided not longer to support Modula-II and Oberon
  547.             version, until someone asks for it!
  548.     17.01.1995 -    Internal procedure: GregorianMoonPhaseHelp.
  549.             Adding a note to the background.
  550.             Correcting small bug in autodocs.
  551.     18.01.1995 -    Found a new (German) book!
  552.     20.01.1995 -    Rita Reichl found David F. Skoll's Reminder3.0 -
  553.             I was so impressed, that I could not continue my
  554.             work for one day ;-)
  555.     21.01.1995 -    I decided to distribute my TextEngine with the date
  556.             library, when I have finished it.
  557.     28.01.1995 -    Adding 'static' to GregorianMoonPhaseHelp.
  558.             Fixing a very small bug.
  559.     01.02.1995 -    Replacing JulianDaySmaller(), GregorianDaySmaller(),
  560.             HeisDaySmaller(), JulianDayGreater(),
  561.             GregorianDayGreater(), HeisDayGreater() with the new
  562.             CompareDates()!
  563.             Procedure: CompareTimes() initiated.
  564.     04.02.1995 -    Adding some things to the autodocs.
  565.     07.02.1995 -    Small fixes in the autodocs, and changing * to
  566.             *const for JulianDiffDate(), GregorianDiffDate(),
  567.             HeisDiffDate(),JDToTime(),SecToTime(),WeekdayText(),
  568.             MonthText(),WeekdayShortText(),MonthShortText(),
  569.             JulianEaster(),GregorianEaster(),HeisEaster(),
  570.             JDToJulian(),JDToGregorian(),JDToHeis().
  571.             Adding const to WeekdayText(),MonthText(),
  572.             WeekdayShortText(),MonthShortText(), maximum().
  573.             Adding C++ support to SecToTime(), JDToTime(),
  574.             JDToJulian(), JDToGregorian(), JDToHeis(),
  575.             JulianEaster(), GregorianEaster(), HeisEaster(),
  576.             JulianDiffDate(), GregorianDiffDate(),HeisDiffDate(),
  577.             GregorianMoonPhase()
  578.             Changing the order of #ifdef headers.
  579.             Fixing type conversion bugs (found with C++)
  580.     17.02.1995 -    I good a hint about Jean-Michel Leon's 'K-lendars'
  581.             nice thing ;-)
  582.     18.02.1995 -    More languages for WeekdayText(), WeekdayShortText(),
  583.             MonthText(), MonthShortText()
  584.             Procedures DateText() ValidTime() initiated.
  585.             Bug in WeekdayText(), WeekdayShortText(),
  586.             MonthText(), MonthShortText() fixed
  587.             Procedures: ValidJulianDate(), ValidGregorianDate(),
  588.             ValidHeisDate() as dummys initiated.
  589.     19.02.1995 -    Procedures: ValidJulianDate(), ValidGregorianDate(),
  590.             ValidHeisDate() finished.
  591.             Procedure SetCountry() initiated.
  592.     24.02.1995 -    Rita Reichl corrects my bad English - again *THANX*
  593.     26.02.1995 -    Adding Polish and Finnish support (not public)
  594.     27.02.1995 -    Renaming CompareDates() to Compare2Dates() and
  595.             CompareTimes() to Compare2Times() because there is an
  596.             conflict with AmigaDOS!
  597.     28.02.1995 -    To-Do list is not longer internal.
  598.     07.03.1995 -    I got the three magic books :) thanx to Rita Reichl!
  599.     09.03.1995
  600.     12.03.1995 -    These two days I was at CeBit in Hannover!
  601.             Whatever I observed and whatever material I acquired
  602.             will change some things for commercial distribution
  603.             (I was so uninformed and naive ;-)
  604.     16.03.1995 -    Some work and corrections on the autodocs.
  605.     20.03.1995 -    Compiled with SAS C 6.55
  606.     21.03.1995 -    Fixing C++ abs() problem!
  607.             (I don't know why SAS means that this is a problem!)
  608.     23.03.1995 -    Fixing following things:
  609.             Adding 'L' to the constant in JDToGregorian()
  610.             Removing three conditions from ValidTime().
  611.             maximum() is only needed for Amiga code!
  612.             GregorianJHSB(), GregorianSB() is not longer needed.
  613.             Thanx to Christian Schaefer for finding this
  614.             things with Borland C++!
  615.     24.03.1995 -    I read, that the Julian Calendar is stabel from
  616.             8 on and not from -7, so I corrected the autodocs!
  617.     31.03.1995 -    Some work on DateText().
  618.             Reformating the DISCLAIMER to autodoc style.
  619.     01.04.1995 -    Moving TimeToJD(), JDToTime(), TimeZoneFactor(),
  620.             LMT(), TimeToSec(), SecToTime(), Compare2Times(),
  621.             ValidTime() to Date_Time.c (this is no April fool ;-)
  622.     06.04.1995 -    Minor work on the autodocs.
  623.     07.04.1995 -    Adding prototype for _DateCleanup() to Date.h.
  624.             GregorianSZ() is not longer needed.
  625.             Thanks to Christian Schaefer for reporting this bugs!
  626.     14.05.1995 -    New copyright notice!
  627.     19.05.1995 -    Rita Reichl corrects my bad English.
  628.     23.05.1995 -    Writing announcement.
  629.     01.06.1995 -    Correcting announcement and including it in the
  630.             autodocs.
  631.     03.06.1995 -    Procedures: TimeDiff(), DiffTime() initiated.
  632.             Fixing small bugs in datetest.c and implementing
  633.             C++ support
  634.     09.06.1995 -    Writing Installer script (Amiga only)
  635.     14.06.1995 -    Small fixes in GregorianEaster(), GregorianEP(),
  636.             GSYearToJD(), GregorianWeekday(), GregorianDayDiff(),
  637.             HeisDayDiff()
  638.     18.06.1995 -    Again small fixes in GregorianDayDiff(),
  639.             HeisDayDiff()
  640.     28.06.1995 -    Small Autodoc fixes
  641.     08.07.1995 -    Fixing bug in DiffTime()
  642.     14.07.1995 -    Workaround, for a SAS C++ problem.
  643.             Thanks to James Cooper for the hint.
  644.     18.07.1995 -    Fixing 'is long constant' warnings in Date_Time.h
  645.             Fixing two missed enum's for the C++ workaround.
  646.     28.07.1995 -    Shortening the year of the version-string to 95,
  647.             because the Amiga 'version' command is buggy!
  648.     29.07.1995 -    Expanding announcement for DateClass.
  649.  
  650. Date/--release--                                             Date/--release--
  651.  
  652.    NAME
  653.     release -- This is the release history of the Date module
  654.  
  655.    RELEASE
  656.     13.04.1994 : 33.087 -    V1.0 First release on Aminet3 & SaarAG 707
  657.     13.08.1994 : 33.088 -    V1.1 Second release on Aminet4, SaarAG 793,
  658.                      Fred Fish & SimTel
  659.     18.12.1994 : 33.093 -    V1.2 Third release on Aminet
  660.     06.02.1995 : 33.100 -    V1.3 Fourth release on Aminet, Amiga-PD-1
  661.     01.08.1995 : 33.158 -    V1.4 Fifth release on Aminet, SaarAG,
  662.                      Fred Fish & SimTel
  663.  
  664. Date/--todo--                                                   Date/--todo--
  665.  
  666.    NAME
  667.     todo -- This is the 'To-Do' list of the Date module
  668.  
  669.    TODO
  670.     DateText() plural strings
  671.     Country strings for TextEngine
  672.     (Local catalog (Amiga only))
  673.     A function to compare date/time of different time zones!
  674.     DATE/ECHO like shell command
  675.     Country dependend for 1582
  676.     Rising/setting of moon and sun
  677.     Parser for datestrings
  678.     EVAL like shell command
  679.     Tcl interface
  680.     Other calenders, like the Islamic and the Jewish
  681.  
  682. Date/_DateCleanup                                           Date/_DateCleanup
  683.  
  684.    NAME
  685.     _DateCleanup -- Procedure to cleanup this module! (V33)
  686.  
  687.    SYNOPSIS
  688.     _DateCleanup();
  689.  
  690.     void _DateCleanup(void);
  691.  
  692.    FUNCTION
  693.     Cleanup this module, after using!
  694.  
  695.    INPUTS
  696.     None.
  697.  
  698.    RESULT
  699.     None.
  700.  
  701.    EXAMPLE
  702.     ...
  703.     _DateCleanup();
  704.     ...
  705.  
  706.    NOTES
  707.     This function is only needed/available if you do not compile this
  708.     with a SAS C Compiler (using Autoinitialization!)
  709.     If you are not using SASC - don't forget to cleanup this module with
  710.     this function - or you will get into trouble!!!
  711.  
  712.    BUGS
  713.     unknown.
  714.  
  715.    SEE ALSO
  716.     _DateInit()
  717.  
  718. Date/_DateInit                                                 Date/_DateInit
  719.  
  720.    NAME
  721.     _DateInit -- Procedure to initialize this module! (V33)
  722.  
  723.    SYNOPSIS
  724.     _DateInit();
  725.  
  726.     void _DateInit(void);
  727.  
  728.    FUNCTION
  729.     Initialize this module, like the modulebody in Modula-II or Oberon-2
  730.  
  731.    INPUTS
  732.     None.
  733.  
  734.    RESULT
  735.     None.
  736.  
  737.    EXAMPLE
  738.     ...
  739.     _DateInit();
  740.     ...
  741.  
  742.    NOTES
  743.     This function is only needed/available if you do not compile this
  744.     with a SAS C Compiler (using Autoinitialization!)
  745.     If you are not using SASC - don't forget to init this module with
  746.     this function - or you will get into trouble!!!
  747.  
  748.    BUGS
  749.     unknown.
  750.  
  751.    SEE ALSO
  752.     _DateCleanup()
  753.  
  754. Date/Compare2Dates                                         Date/Compare2Dates
  755.  
  756.    NAME
  757.     Compare2Dates -- Compares date1 with date2. (V33.100)
  758.  
  759.    SYNOPSIS
  760.     compare = Compare2Dates(day1,month1,year1,day2,month2,year2);
  761.       d0             d0    d1    d2    d3    d4    d5
  762.  
  763.     short Compare2Dates(const unsigned short day1,
  764.         const unsigned short month1, const int year1,
  765.         const unsigned short day2, const unsigned short month2,
  766.         const int year2);
  767.  
  768.    FUNCTION
  769.     Compare2Dates compares date1 with date2.
  770.  
  771.    INPUTS
  772.     day1   - day of the first date
  773.     month1 - month of the first date
  774.     year1  - year of the first date
  775.     day2   - day of the second date
  776.     month2 - month of the second month
  777.     year2  - year of the second date
  778.  
  779.    RESULT
  780.     compare - -1 : date1 < date2
  781.            0 : date1 = date2
  782.            1 : date1 > date2
  783.  
  784.    EXAMPLE
  785.     ...
  786.     if (Compare2Dates(18,9,1970,22,1,1994) == -1)
  787.       printf("<\n");
  788.     else
  789.       printf(">=\n");
  790.     ...
  791.  
  792.    NOTES
  793.     It is better only to use this function for years from 8 to 8000!
  794.     There is no need for different versions for Julian, Gregorian and
  795.     Heis dates!
  796.  
  797.    BUGS
  798.     There is no check if the dates are valid!
  799.  
  800.    SEE ALSO
  801.     Compare2Times()
  802.  
  803. Date/Compare2Times                                         Date/Compare2Times
  804.  
  805.    NAME
  806.     Compare2Times -- Compares time1 with time2. (V33.100)
  807.  
  808.    SYNOPSIS
  809.     compare = Compare2Times(hour1,min1,sec1,hour2,min2,sec2);
  810.       d0             d0    d1   d2   d3    d4   d5
  811.  
  812.     short Compare2Times(const unsigned short hour1,
  813.         const unsigned short min1, const unsigned short sec1,
  814.         const unsigned short hour2, const unsigned short min2,
  815.         const unsigned short sec2);
  816.  
  817.    FUNCTION
  818.     Compare2Times compares time1 with time2 (24h format only).
  819.  
  820.    INPUTS
  821.     hour1 - Hour of the first time.
  822.     min1  - Minute of the first time.
  823.     sec1  - Second of the first time.
  824.     hour2 - Hour of the second time.
  825.     min2  - Minute of the second time.
  826.     sec2  - Second of the second time.
  827.  
  828.    RESULT
  829.     compare - -1 : time1 < time2
  830.            0 : time1 = time2
  831.            1 : time1 > time2
  832.  
  833.    EXAMPLE
  834.     ...
  835.     if (Compare2Times(13,10,0,9,0,0) == -1)
  836.       printf("<\n");
  837.     else
  838.       printf(">=\n");
  839.     ...
  840.  
  841.    NOTES
  842.     This compares two times of 24h format!
  843.  
  844.    BUGS
  845.     There is no check if the times are valid times!
  846.  
  847.    SEE ALSO
  848.     Compare2Dates()
  849.  
  850. Date/DateText                                                   Date/DateText
  851.  
  852.    NAME
  853.     DateText -- Get a date text string. (V33.130)
  854.  
  855.    SYNOPSIS
  856.     DateText(dt,mtext,lang,plural);
  857.              d0  a0    d1    d2
  858.  
  859.     void DateText(const DateTexts dt, char *const text,
  860.         Languages lang, const bool plural);
  861.  
  862.    FUNCTION
  863.     This function gets a date specified text in each supported language
  864.  
  865.    INPUTS
  866.     dt     - The text you want.
  867.     text   - Pointer to a string to fill in the text.
  868.     lang   - Language for which you want the text.
  869.     plural - false: The singular form is given.
  870.              true : The plural form is given.
  871.  
  872.    RESULT
  873.     None
  874.  
  875.    EXAMPLE
  876.     ...
  877.     char txt[20];
  878.     ...
  879.     DateText(day,&txt,English,false);
  880.     ...
  881.  
  882.    NOTES
  883.     Available languages:
  884.     Locale    : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  885.                 and other systems it will return English text!
  886.     English
  887.     Deutsch
  888.     français  : For non ISO8859_Latin1-systems this is called francais!
  889.     español   : For non ISO8859_Latin1-systems this is called espanol!
  890.     português : For non ISO8859_Latin1-systems this is called portugues!
  891.     dansk
  892.     italiano
  893.     nederlands
  894.     norsk
  895.     svenska
  896.     polski
  897.     suomalainen
  898.  
  899.     Available strings:
  900.     DAY,MONTH,YEAR,WEEK,WEEKDAY,HOUR,MINUTE,SECOND,YESTERDAY,TODAY,
  901.     TOMORROW
  902.  
  903.     In the moment there is only the singular text available!!!
  904.  
  905.    BUGS
  906.     In this version there is no check, if there is enough space in
  907.     text!
  908.  
  909.    SEE ALSO
  910.     WeekdayText(),WeekdayShortText(),MonthText(),MonthShortText()
  911.  
  912. Date/DiffTime                                                   Date/DiffTime
  913.  
  914.    NAME
  915.     DiffTime -- Returns the diff. time to another time. (V33)
  916.  
  917.    SYNOPSIS
  918.     DiffTime(hour,min,sec,secs,rhour,rmin,rsec);
  919.           d0  d1  d2  d3   a0    a1   a2
  920.  
  921.     void DiffTime(const unsigned short hour, const unsigned short min,
  922.         const unsigned short sec, long secs, unsigned short *const rhour,
  923.         unsigned short *const rmin, unsigned short *const rsec);
  924.  
  925.     void DiffTime(const unsigned short hour, const unsigned short min,
  926.         const unsigned short sec, long secs, unsigned short &rhour,
  927.         unsigned short &rmin, unsigned short &rsec);
  928.  
  929.    FUNCTION
  930.     Returns the time which lies diffsecs before/after the specified time.
  931.  
  932.    INPUTS
  933.     hour     - hour
  934.     min      - minute
  935.     sec      - second
  936.     diffsecs - difference to the time in seconds
  937.  
  938.    RESULT
  939.     rhour - new hour
  940.     rmin  - new minute
  941.     rsec  - new second
  942.  
  943.    EXAMPLE
  944.     ...
  945.     DiffTime(12,19,0,2460,&hour,&min,&sec);
  946.     ...
  947.  
  948.    NOTES
  949.     Don't forget to convert AM/PM to 24h time!
  950.     Don't forget to convert 24h time to AM/PM time if needed!
  951.  
  952.    BUGS
  953.     No errorcheck, if you use a valid time
  954.  
  955.    SEE ALSO
  956.     TimeToSec(),SecToTime()
  957.  
  958. Date/GregorianDayDiff                                   Date/GregorianDayDiff
  959.  
  960.    NAME
  961.     GregorianDayDiff -- Calculates the days between 2 dates. (V33)
  962.  
  963.    SYNOPSIS
  964.     days = GregorianDayDiff(day1,month1,year1,day2,month2,year2);
  965.      d0                 d0    d1    d2    d3    d4    d5
  966.  
  967.     long GregorianDayDiff(const unsigned short day1,
  968.         unsigned short month1, int year1, const unsigned short day2,
  969.         unsigned short month2, int year2);
  970.  
  971.    FUNCTION
  972.     GregorianDayDiff gives you back the number of days between
  973.     two specified dates.
  974.  
  975.    INPUTS
  976.     day1   - day of the first date
  977.     month1 - month of the first date
  978.     year1  - year of the first date
  979.     day2   - day of the second date
  980.     month2 - month of the second month
  981.     year2  - year of the second date
  982.  
  983.    RESULT
  984.     days - The number of days between the two dates
  985.         (positive if date1 <= date2).
  986.  
  987.    EXAMPLE
  988.     ...
  989.     days = GregorianDayDiff(18,9,1970,22,1,1994);
  990.     printf("Age of Kai Hofmann in days : %d\n",days);
  991.     ...
  992.  
  993.    NOTES
  994.     It is better only to use this function for years from 8 to 02.3200!
  995.  
  996.    BUGS
  997.     If you use one of the dates 5.10.1582 to 14.10.1582 you will get an
  998.     incorrect output because these days don't exist!
  999.  
  1000.    SEE ALSO
  1001.     GregorianLeapYear(),GregorianMonthDays(),GregorianYearDays(),
  1002.     JulianDayDiff(),HeisDayDiff()
  1003.  
  1004. Date/GregorianDaysAfterWeekday                 Date/GregorianDaysAfterWeekday
  1005.  
  1006.    NAME
  1007.     GregorianDaysAfterWeekday -- Returns the diff to wday after. (V33)
  1008.  
  1009.    SYNOPSIS
  1010.     days = GregorianDaysAfterWeekday(day,month,year,weekday);
  1011.      d0                      d0   d1   d2     d3
  1012.  
  1013.     unsigned short GregorianDaysAfterWeekday(const unsigned short day,
  1014.         const unsigned short month, const int year,
  1015.         const Weekdays weekday);
  1016.  
  1017.    FUNCTION
  1018.     Returns the days to the weekday after the specified date.
  1019.     If you specify the 22.1.1994 (Saturday) and Thursday
  1020.     you get back 5!
  1021.     If you specify the 22.1.1994 and Saturday you get back 0
  1022.     (the same day)!
  1023.  
  1024.    INPUTS
  1025.     day     - day of the date
  1026.     month   - month of the date
  1027.     year    - year of the date
  1028.     weekday - weekday to search for building difference
  1029.  
  1030.    RESULT
  1031.     days - The days after to the searched weekday.
  1032.  
  1033.    EXAMPLE
  1034.     ...
  1035.     days = GregorianDaysAfterWeekday(22,1,1994,Thursday);
  1036.     ...
  1037.  
  1038.    NOTES
  1039.     It is better to use this function only from 8 to 3200!
  1040.  
  1041.    BUGS
  1042.     See GregorianWeekday()!
  1043.  
  1044.    SEE ALSO
  1045.     GregorianWeekday(),JulianDaysAfterWeekday(),HeisDaysAfterWeekday()
  1046.  
  1047. Date/GregorianDaysBeforeWeekday               Date/GregorianDaysBeforeWeekday
  1048.  
  1049.    NAME
  1050.     GregorianDaysBeforeWeekday -- Returns the diff to wday before. (V33)
  1051.  
  1052.    SYNOPSIS
  1053.     days = GregorianDaysBeforeWeekday(day,month,year,weekday);
  1054.      d0                   d0  d1    d2    d3
  1055.  
  1056.     unsigned short GregorianDaysBeforeWeekday(const unsigned short day,
  1057.         const unsigned short month, const int year,
  1058.         const Weekdays weekday);
  1059.  
  1060.    FUNCTION
  1061.     Returns the days to the weekday before the specified date.
  1062.     If you specify the 22.1.1994 (Saturday) and Thursday
  1063.     you get back 2!
  1064.     If you specify the 22.1.1994 and Saturday you get back 0
  1065.     (the same day)!
  1066.  
  1067.    INPUTS
  1068.     day     - day of the date
  1069.     month   - month of the date
  1070.     year    - year of the date
  1071.     weekday - weekday to search for building difference
  1072.  
  1073.    RESULT
  1074.     days - The days gets you back to the searched weekday (1-7)
  1075.         If you get back an 8 an error occurs!
  1076.  
  1077.    EXAMPLE
  1078.     ...
  1079.     days = GregorianDaysBeforeWeekday(22,1,1994,Thursday);
  1080.     ...
  1081.  
  1082.    NOTES
  1083.     It is better to use this function only from 8 to 3200!
  1084.  
  1085.    BUGS
  1086.     See GregorianWeekday()!
  1087.  
  1088.    SEE ALSO
  1089.     GregorianWeekday(),JulianDaysBeforeWeekday(),HeisDaysBeforeWeekday()
  1090.  
  1091. Date/GregorianDiffDate                                 Date/GregorianDiffDate
  1092.  
  1093.    NAME
  1094.     GregorianDiffDate -- Returns the diff date to another date. (V33)
  1095.  
  1096.    SYNOPSIS
  1097.     GregorianDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  1098.                d0   d1   d2     d3     a0    a1    a2
  1099.  
  1100.     void GregorianDiffDate(const unsigned short day,
  1101.         const unsigned short month, const int year, int days,
  1102.         unsigned short *const dday, unsigned short *const dmonth,
  1103.         int *const dyear);
  1104.  
  1105.     void GregorianDiffDate(const unsigned short day,
  1106.         const unsigned short month, const int year, int days,
  1107.         unsigned short &dday, unsigned short &dmonth, int &dyear);
  1108.  
  1109.    FUNCTION
  1110.     Returns the date which lies diffdays before/after the specified date.
  1111.  
  1112.    INPUTS
  1113.     day      - day of the date
  1114.     month    - month of the date
  1115.     year     - year of the date
  1116.     diffdays - difference to the date in days
  1117.  
  1118.    RESULT
  1119.     dday   - Destination day
  1120.     dmonth - Destination month
  1121.     dyear  - Destination year
  1122.  
  1123.    EXAMPLE
  1124.     ...
  1125.     GregorianDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  1126.     ...
  1127.  
  1128.    NOTES
  1129.     It is better to use this function only from 8 to 3200!
  1130.  
  1131.    BUGS
  1132.     unknown.
  1133.  
  1134.    SEE ALSO
  1135.     GregorianDayDiff(),GregorianMonthDays(),JulianDiffDate(),
  1136.     HeisDiffDate()
  1137.  
  1138. Date/GregorianEaster                                     Date/GregorianEaster
  1139.  
  1140.    NAME
  1141.     GregorianEaster -- Returns the date of Easter in a year (V33)
  1142.  
  1143.    SYNOPSIS
  1144.     GregorianEaster(year,dday,dmonth);
  1145.              d0   a0    a1
  1146.  
  1147.     void GregorianEaster(const int year, unsigned short *const dday,
  1148.         unsigned short *const dmonth);
  1149.  
  1150.     void GregorianEaster(const int year, unsigned short &dday,
  1151.         unsigned short &dmonth);
  1152.  
  1153.    FUNCTION
  1154.     Returns the date of Easter for a specified year.
  1155.  
  1156.    INPUTS
  1157.     year  - Easter is calculated for this year
  1158.  
  1159.    RESULT
  1160.     dday   - day of Easter Sunday
  1161.     dmonth - month of Easter Sunday
  1162.  
  1163.    EXAMPLE
  1164.     ...
  1165.     GregorianEaster(1994,&dday,&dmonth);
  1166.     ...
  1167.  
  1168.    NOTES
  1169.     Use this only for 31 to 2099!
  1170.  
  1171.    BUGS
  1172.     None.
  1173.  
  1174.    SEE ALSO
  1175.     JulianEaster(),HeisEaster()
  1176.  
  1177. Date/GregorianLeapYear                                 Date/GregorianLeapYear
  1178.  
  1179.    NAME
  1180.     GregorianLeapYear -- Checks if a year is a leap year. (V33)
  1181.  
  1182.    SYNOPSIS
  1183.     leapyear = GregorianLeapYear(year);
  1184.        d0                  d0
  1185.  
  1186.     bool GregorianLeapYear(const int year);
  1187.  
  1188.    FUNCTION
  1189.     GregorianLeapYear checks if a year is a leap year.
  1190.     For years after 1582 all years devideable by 4 are leap years,
  1191.     without years devideable by 100, but years devideable by 400
  1192.     are leap years again!
  1193.     For years before 1582 see JulianLeapYear().
  1194.  
  1195.    INPUTS
  1196.     year - The year which should be checked (from -32768 to 32767)
  1197.         I think only values from 8 to 3200 are valid, because of
  1198.         the variant that was done by Augustus!
  1199.  
  1200.    RESULT
  1201.     leapyear - TRUE if the year is a leap year, otherwise false.
  1202.  
  1203.    EXAMPLE
  1204.     ...
  1205.     if (GregorianLeapYear(1994))
  1206.       printf("leap year!\n");
  1207.     else
  1208.       printf("no leap year!\n");
  1209.     ...
  1210.  
  1211.    NOTES
  1212.     A year is 365.2425 days long!
  1213.     Use this function only for values from 8 to 3199!
  1214.  
  1215.    BUGS
  1216.     No known bugs.
  1217.  
  1218.    SEE ALSO
  1219.     JulianLeapYear(),HeisLeapYear()
  1220.  
  1221. Date/GregorianMonthDays                               Date/GregorianMonthDays
  1222.  
  1223.    NAME
  1224.     GregorianMonthDays -- Returns the number of days of a month. (V33)
  1225.  
  1226.    SYNOPSIS
  1227.     days = GregorianMonthDays(month,year);
  1228.      d0               d0    d1
  1229.  
  1230.     unsigned short GregorianMonthDays(const unsigned short month,
  1231.         const int year);
  1232.  
  1233.    FUNCTION
  1234.     GregorianMonthDays returns the number of days a month in
  1235.     a specified year has.
  1236.     For the year 1582 and the month 10 there are only 21 days,
  1237.     because of the Gregorian-reform 10 days are deleted from
  1238.     the month (for more - look out for books about this!)
  1239.  
  1240.    INPUTS
  1241.     month - The month from which you want to get the number of days.
  1242.     year  - The year in which the month is.
  1243.  
  1244.    RESULT
  1245.     days - The number of days the month uses, or 0 if you use
  1246.         an incorrect month.
  1247.  
  1248.    EXAMPLE
  1249.     ...
  1250.     days = GregorianMonthDays(1,1994);
  1251.     printf("Days of January 1994 : %d\n",days);
  1252.     ...
  1253.  
  1254.    NOTES
  1255.     Use this function only for years from 8 to 3199!
  1256.  
  1257.    BUGS
  1258.     none.
  1259.  
  1260.    SEE ALSO
  1261.     GregorianLeapYear(),JulianMonthDays(),HeisMonthDays()
  1262.  
  1263. Date/GregorianMoonAge                                   Date/GregorianMoonAge
  1264.  
  1265.    NAME
  1266.     GregorianMoonAge -- Returns the age of the moon (V33)
  1267.  
  1268.    SYNOPSIS
  1269.     ep = GregorianMoonAge(day,month,year);
  1270.     d0               d0   d1   d2
  1271.  
  1272.     unsigned short GregorianMoonAge(const unsigned short day,
  1273.         const unsigned short month, const int year);
  1274.  
  1275.    FUNCTION
  1276.     Returns the age of the moon on a specified date.
  1277.  
  1278.    INPUTS
  1279.     day   - For this day the age is calculated.
  1280.     month - For this month the age is calculated.
  1281.     year  - For this year the age is calculated.
  1282.  
  1283.    RESULT
  1284.     ep - The age of the moon on the specified date.
  1285.  
  1286.    EXAMPLE
  1287.     ...
  1288.     ep = GregorianMoonAge(18,9,1994);
  1289.     ...
  1290.  
  1291.    NOTES
  1292.     Use this only for 1582 to 4100!
  1293.     This is only an experimental version!
  1294.  
  1295.    BUGS
  1296.     unknown.
  1297.  
  1298.    SEE ALSO
  1299.     MoonMonthAge(),GregorianEP(),GregorianMoonPhase()
  1300.  
  1301. Date/GregorianMoonPhase                               Date/GregorianMoonPhase
  1302.  
  1303.    NAME
  1304.     GregorianMoonPhase -- Searches for the next moon phase (V33.098)
  1305.  
  1306.    SYNOPSIS
  1307.     jd = GregorianMoonPhase(day,month,year,phase);
  1308.     d0                d0   d1    d2   d3
  1309.  
  1310.     unsigned long GregorianMoonPhase(const unsigned short day,
  1311.         const unsigned short month, const int year,
  1312.         const MoonPhases phase);
  1313.  
  1314.    FUNCTION
  1315.     Returns the next moon phase you are searching for after
  1316.     a specified date.
  1317.  
  1318.    INPUTS
  1319.     day   - Start day for the search.
  1320.     month - Start month for the search.
  1321.     year  - Start year for the search.
  1322.     phase - The moon phase you want to know.
  1323.  
  1324.    RESULT
  1325.     jd - The day (as JD) on wich the moon phase was found.
  1326.  
  1327.    EXAMPLE
  1328.     ...
  1329.     jd = GregorianMoonPhase(18,9,1994,FullMoon);
  1330.     JDToGregorian(jd,&day,&month,&year);
  1331.     ...
  1332.  
  1333.    NOTES
  1334.     The range of this function is unknown to me!
  1335.     So use it only from 1583 to 2500.
  1336.     This is only an experimental version!
  1337.  
  1338.    BUGS
  1339.     unknown.
  1340.  
  1341.    SEE ALSO
  1342.     MoonMonthAge()
  1343.  
  1344. Date/GregorianToJD                                         Date/GregorianToJD
  1345.  
  1346.    NAME
  1347.     GregorianToJD -- Returns the JD for a date. (V33)
  1348.  
  1349.    SYNOPSIS
  1350.     jd = GregorianToJD(day,month,year);
  1351.     d0           d0   d1    d2
  1352.  
  1353.     unsigned long GregorianToJD(const unsigned short day,
  1354.         const unsigned short month, const int year);
  1355.  
  1356.    FUNCTION
  1357.     Returns the JD for a Gregorian date.
  1358.  
  1359.    INPUTS
  1360.     day      - day of the date to convert
  1361.     month    - month of the date to convert
  1362.     year     - year of the date to convert
  1363.  
  1364.    RESULT
  1365.     jd - This is the JD
  1366.  
  1367.    EXAMPLE
  1368.     ...
  1369.     jd = GregorianToJD(23,1,1994);
  1370.     ...
  1371.  
  1372.    NOTES
  1373.     It is better to use this function only from 8 to 3200!
  1374.  
  1375.    BUGS
  1376.     unknown.
  1377.  
  1378.    SEE ALSO
  1379.     GSYearToJD(),GYearToScaliger(),GregorianDayDiff(),JulianToJD(),
  1380.     HeisToJD()
  1381.  
  1382. Date/GregorianWeek                                         Date/GregorianWeek
  1383.  
  1384.    NAME
  1385.     GregorianWeek -- Gets the weeknumber for a specified date. (V33)
  1386.  
  1387.    SYNOPSIS
  1388.     weeknr = GregorianWeek(day,month,year);
  1389.       d0            d0   d1   d2
  1390.  
  1391.     unsigned short GregorianWeek(const unsigned short day,
  1392.         const unsigned short month, const int year);
  1393.  
  1394.    FUNCTION
  1395.     GregorianWeek gets the number of the week for a specified date.
  1396.  
  1397.    INPUTS
  1398.     day   - day of the date
  1399.     month - month of the date
  1400.     year  - year of the date
  1401.  
  1402.    RESULT
  1403.     week - This is the number of the week the specified date lies in.
  1404.         If the first day in a new year is a Friday, Saturday or
  1405.         Sunday, this would be the last week of the last year!
  1406.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  1407.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  1408.         first week of the next year!
  1409.  
  1410.    EXAMPLE
  1411.     ...
  1412.     weeknr = GregorianWeek(4,10,1582);
  1413.     ...
  1414.  
  1415.    NOTES
  1416.     It is better only to use this function for years from 0 to 3000!
  1417.  
  1418.    BUGS
  1419.     For years < 0 errors could occur.
  1420.  
  1421.    SEE ALSO
  1422.     JulianWeek(),HeisWeek(),GregorianWeekday(),GregorianDayDiff()
  1423.  
  1424. Date/GregorianWeekday                                   Date/GregorianWeekday
  1425.  
  1426.    NAME
  1427.     GregorianWeekday -- Gets the weekday of a specified date. (V33)
  1428.  
  1429.    SYNOPSIS
  1430.     weekday = GregorianWeekday(day,month,year);
  1431.       d0                d0   d1   d2
  1432.  
  1433.     Weekdays GregorianWeekday(const unsigned short day,
  1434.         unsigned short month, int year);
  1435.  
  1436.    FUNCTION
  1437.     GregorianWeekday gets the weekday for a specified date.
  1438.  
  1439.    INPUTS
  1440.     day   - day of the date
  1441.     month - month of the date
  1442.     year  - year of the date
  1443.  
  1444.    RESULT
  1445.     weekday - This result is of type:
  1446.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  1447.         Saturday,Sunday);
  1448.         dayerr will show you, that an error occurs!
  1449.  
  1450.    EXAMPLE
  1451.     ...
  1452.     weekday = GregorianWeekday(22,1,1994);
  1453.     if (weekday == dayerr)
  1454.       {
  1455.        ...
  1456.       }
  1457.     ...
  1458.  
  1459.    NOTES
  1460.     It is better only to use this function for years from 8 to 3200!
  1461.     In this version dayerr will only occur for the lost days :)
  1462.  
  1463.    BUGS
  1464.     It's not possible to use years < 0 (for more see JulianWeekday()).
  1465.  
  1466.    SEE ALSO
  1467.     JulianWeekday(),HeisWeekday()
  1468.  
  1469. Date/GregorianYearDays                                 Date/GregorianYearDays
  1470.  
  1471.    NAME
  1472.     GregorianYearDays -- Gives back the number of days in a year. (V33)
  1473.  
  1474.    SYNOPSIS
  1475.     days = GregorianYearDays(year);
  1476.      d0              d0
  1477.  
  1478.     unsigned int GregorianYearDays(const int year);
  1479.  
  1480.    FUNCTION
  1481.     GregorianYearDays gives you back the number of days in
  1482.     a specified year.
  1483.  
  1484.    INPUTS
  1485.     year  - The year in which to count the days.
  1486.  
  1487.    RESULT
  1488.     days - The number of days the year uses.
  1489.  
  1490.    EXAMPLE
  1491.     ...
  1492.     days = GregorianYearDays(1994);
  1493.     printf("Days of 1994 : %d\n",days);
  1494.     ...
  1495.  
  1496.    NOTES
  1497.     It is better only to use this function for years from 8 to 3199!
  1498.  
  1499.    BUGS
  1500.     No known bugs.
  1501.  
  1502.    SEE ALSO
  1503.     GregorianMonthDays(),JulianYearDays(),HeisYearDays()
  1504.  
  1505. Date/GSYearToJD                                               Date/GSYearToJD
  1506.  
  1507.    NAME
  1508.     GSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  1509.  
  1510.    SYNOPSIS
  1511.     jd = GSYearToJD(syear);
  1512.     d0         d0
  1513.  
  1514.     unsigned long GSYearToJD(const unsigned int syear);
  1515.  
  1516.    FUNCTION
  1517.     Returns the Julianday of a Scaliger year.
  1518.  
  1519.    INPUTS
  1520.     syear     - Scaliger year
  1521.  
  1522.    RESULT
  1523.     jd - The Julianday
  1524.  
  1525.    EXAMPLE
  1526.     ...
  1527.     jd = GSYearToJD(4800);
  1528.     ...
  1529.  
  1530.    NOTES
  1531.     It is better to use this function only from 4707 to 7981!
  1532.  
  1533.    BUGS
  1534.     unknown.
  1535.  
  1536.    SEE ALSO
  1537.     JSYearToJD(),HSYearToJD()
  1538.  
  1539. Date/GYearToScaliger                                     Date/GYearToScaliger
  1540.  
  1541.    NAME
  1542.     GYearToScaliger -- Returns the year as Scaliger year. (V33)
  1543.  
  1544.    SYNOPSIS
  1545.     syear = GYearToScaliger(year);
  1546.      d0             d0
  1547.  
  1548.     unsigned int GYearToScaliger(const int year);
  1549.  
  1550.    FUNCTION
  1551.     Returns the Scaliger year.
  1552.  
  1553.    INPUTS
  1554.     year     - Gregorian year
  1555.  
  1556.    RESULT
  1557.     syear - The Scaliger year
  1558.  
  1559.    EXAMPLE
  1560.     ...
  1561.     syear = GYearToScaliger(1994);
  1562.     ...
  1563.  
  1564.    NOTES
  1565.     It is better to use this function only from 8 to 3200!
  1566.  
  1567.    BUGS
  1568.     unknown.
  1569.  
  1570.    SEE ALSO
  1571.     JYearToScaliger(),HYearToScaliger()
  1572.  
  1573. Date/HeisDayDiff                                             Date/HeisDayDiff
  1574.  
  1575.    NAME
  1576.     HeisDayDiff -- Calculates the days between 2 dates. (V33)
  1577.  
  1578.    SYNOPSIS
  1579.     days = HeisDayDiff(day1,month1,year1,day2,month2,year2);
  1580.      d0            d0    d1    d2    d3    d4    d5
  1581.  
  1582.     long HeisDayDiff(const unsigned short day1, unsigned short month1,
  1583.         int year1, const unsigned short day2, unsigned short month2,
  1584.         int year2);
  1585.  
  1586.    FUNCTION
  1587.     HeisDayDiff gives you back the number of days between
  1588.     two specified dates.
  1589.  
  1590.    INPUTS
  1591.     day1   - day of the first date
  1592.     month1 - month of the first date
  1593.     year1  - year of the first date
  1594.     day2   - day of the second date
  1595.     month2 - month of the second month
  1596.     year2  - year of the second date
  1597.  
  1598.    RESULT
  1599.     days - The number of days between the two dates
  1600.         (positive if date1 <= date2).
  1601.  
  1602.    EXAMPLE
  1603.     ...
  1604.     days = HeisDayDiff(18,9,1970,22,1,1994);
  1605.     printf("Age of Kai Hofmann in days : %d\n",days);
  1606.     ...
  1607.  
  1608.    NOTES
  1609.     It is better only to use this function for years from 8 to 8000!
  1610.  
  1611.    BUGS
  1612.     If you use on of the dates 5.10.1582 to 14.10.1582 you will get an
  1613.     incorrect output because these days don't exist!
  1614.  
  1615.    SEE ALSO
  1616.     HeisLeapYear(),HeisMonthDays(),HeisYearDays(),
  1617.     JulianDayDiff(),GregorianDayDiff()
  1618.  
  1619. Date/HeisDaysAfterWeekday                           Date/HeisDaysAfterWeekday
  1620.  
  1621.    NAME
  1622.     HeisDaysAfterWeekday -- Returns the diff to the wday after. (V33)
  1623.  
  1624.    SYNOPSIS
  1625.     days = HeisDaysAfterWeekday(day,month,year,weekday);
  1626.      d0                 d0   d1   d2     d3
  1627.  
  1628.     unsigned short HeisDaysAfterWeekday(const unsigned short day,
  1629.         const unsigned short month, const int year,
  1630.         const Weekdays weekday);
  1631.  
  1632.    FUNCTION
  1633.     Returns the days to the weekday after the specified date.
  1634.     If you specify the 22.1.1994 (Saturday) and Thursday
  1635.     you get back 5!
  1636.     If you specify the 22.1.1994 and Saturday you get back 0
  1637.     (the same day)!
  1638.  
  1639.    INPUTS
  1640.     day     - day of the date
  1641.     month   - month of the date
  1642.     year    - year of the date
  1643.     weekday - weekday to search for building difference
  1644.  
  1645.    RESULT
  1646.     days - The days after to the searched weekday.
  1647.  
  1648.    EXAMPLE
  1649.     ...
  1650.     days = HeisDaysAfterWeekday(22,1,1994,Thursday);
  1651.     ...
  1652.  
  1653.    NOTES
  1654.     It is better to use this function only from 8 to 8000!
  1655.  
  1656.    BUGS
  1657.     See HeisWeekday()!
  1658.  
  1659.    SEE ALSO
  1660.     HeisWeekday(),JulianDaysAfterWeekday(),GregorianDaysAfterWeekday()
  1661.  
  1662. Date/HeisDaysBeforeWeekday                         Date/HeisDaysBeforeWeekday
  1663.  
  1664.    NAME
  1665.     HeisDaysBeforeWeekday -- Returns the diff to wday before. (V33)
  1666.  
  1667.    SYNOPSIS
  1668.     days = HeisDaysBeforeWeekday(day,month,year,weekday);
  1669.      d0                  d0  d1    d2    d3
  1670.  
  1671.     unsigned short HeisDaysBeforeWeekday(const unsigned short day,
  1672.         const unsigned short month, const int year,
  1673.         const Weekdays weekday);
  1674.  
  1675.    FUNCTION
  1676.     Returns the days to the weekday before the specified date.
  1677.     If you specify the 22.1.1994 (Saturday) and Thursday
  1678.     you get back 2!
  1679.     If you specify the 22.1.1994 and Saturday you get back 0
  1680.     (the same day)!
  1681.  
  1682.    INPUTS
  1683.     day     - day of the date
  1684.     month   - month of the date
  1685.     year    - year of the date
  1686.     weekday - weekday to search for building difference
  1687.  
  1688.    RESULT
  1689.     days - The days gets you back to the searched weekday (1-7)
  1690.         If you get back an 8 an error occurs!
  1691.  
  1692.    EXAMPLE
  1693.     ...
  1694.     days = HeisDaysBeforeWeekday(22,1,1994,Thursday);
  1695.     ...
  1696.  
  1697.    NOTES
  1698.     It is better to use this function only from 8 to 8000!
  1699.  
  1700.    BUGS
  1701.     See HeisWeekday()!
  1702.  
  1703.    SEE ALSO
  1704.     HeisWeekday(),JulianDaysBeforeWeekday(),GregorianDaysBeforeWeekday()
  1705.  
  1706. Date/HeisDiffDate                                           Date/HeisDiffDate
  1707.  
  1708.    NAME
  1709.     HeisDiffDate -- Returns the date for a diff to another date. (V33)
  1710.  
  1711.    SYNOPSIS
  1712.     HeisDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  1713.               d0   d1   d2     d3     a0    a1    a2
  1714.  
  1715.     void HeisDiffDate(const unsigned short day,
  1716.         const unsigned short month, const int year, int days,
  1717.         unsigned short *const dday, unsigned short *const dmonth,
  1718.         int *const dyear);
  1719.  
  1720.     void HeisDiffDate(const unsigned short day,
  1721.         const unsigned short month, const int year, int days,
  1722.         unsigned short &dday, unsigned short &dmonth, int &dyear);
  1723.  
  1724.    FUNCTION
  1725.     Returns the date which lies diffdays before/after the specified date.
  1726.  
  1727.    INPUTS
  1728.     day      - day of the date
  1729.     month    - month of the date
  1730.     year     - year of the date
  1731.     diffdays - difference to the date in days
  1732.  
  1733.    RESULT
  1734.     dday   - Destination day
  1735.     dmonth - Destination month
  1736.     dyear  - Destination year
  1737.  
  1738.    EXAMPLE
  1739.     ...
  1740.     HeisDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  1741.     ...
  1742.  
  1743.    NOTES
  1744.     It is better to use this function only from 8 to 8000!
  1745.  
  1746.    BUGS
  1747.     unknown.
  1748.  
  1749.    SEE ALSO
  1750.     HeisDayDiff(),HeisMonthDays(),JulianDiffDate(),GregorianDiffDate()
  1751.  
  1752. Date/HeisEaster                                               Date/HeisEaster
  1753.  
  1754.    NAME
  1755.     HeisEaster -- Returns the date of Easter in a year (V33)
  1756.  
  1757.    SYNOPSIS
  1758.     HeisEaster(year,dday,dmonth);
  1759.             d0   a0    a1
  1760.  
  1761.     void HeisEaster(const int year, unsigned short *const dday,
  1762.         unsigned short *const dmonth);
  1763.  
  1764.     void HeisEaster(const int year, unsigned short &dday,
  1765.         unsigned short &dmonth);
  1766.  
  1767.    FUNCTION
  1768.     Returns the date of Easter for a specified year.
  1769.  
  1770.    INPUTS
  1771.     year  - Easter is calculated for this year
  1772.  
  1773.    RESULT
  1774.     dday   - day of Easter Sunday
  1775.     dmonth - month of Easter Sunday
  1776.  
  1777.    EXAMPLE
  1778.     ...
  1779.     HeisEaster(1994,&dday,&dmonth);
  1780.     ...
  1781.  
  1782.    NOTES
  1783.     This is only a dummy to GregorianEaster!
  1784.     Use this only for 31 to 2099!
  1785.  
  1786.    BUGS
  1787.     Unknown.
  1788.  
  1789.    SEE ALSO
  1790.     JulianEaster(),GregorianEaster()
  1791.  
  1792. Date/HeisLeapYear                                           Date/HeisLeapYear
  1793.  
  1794.    NAME
  1795.     HeisLeapYear -- Checks if a year is a leap year. (V33)
  1796.  
  1797.    SYNOPSIS
  1798.     leapyear = HeisLeapYear(year);
  1799.        d0             d0
  1800.  
  1801.     bool HeisLeapYear(const int year);
  1802.  
  1803.    FUNCTION
  1804.     HeisLeapYear checks if a year is a leap year.
  1805.     For years after 1582 see GregorianLeapYear(),
  1806.     The correction from N. Heis says, that all years devideable by
  1807.     3200 are no longer leap years!
  1808.     For years before 1582 see JulianLeapYear().
  1809.  
  1810.    INPUTS
  1811.     year - The year which should be checked (from -32768 to 32767)
  1812.         I think only values from 8 to 32767 are valid, because of
  1813.         the variant that was done by Augustus!
  1814.  
  1815.    RESULT
  1816.     leapyear - TRUE if the year is a leap year, otherwise false.
  1817.  
  1818.    EXAMPLE
  1819.     ...
  1820.     if (HeisLeapYear(1994))
  1821.       printf("leap year!\n");
  1822.     else
  1823.       printf("no leap year!\n");
  1824.     ...
  1825.  
  1826.    NOTES
  1827.     A year is now 365.2421875 days!
  1828.     Use this function only for values from 8 to 8000!
  1829.  
  1830.    BUGS
  1831.     No known bugs.
  1832.  
  1833.    SEE ALSO
  1834.     JulianLeapYear(),GregorianLeapYear()
  1835.  
  1836. Date/HeisMonthDays                                         Date/HeisMonthDays
  1837.  
  1838.    NAME
  1839.     HeisMonthDays -- Returns the number of days of a month. (V33)
  1840.  
  1841.    SYNOPSIS
  1842.     days = HeisMonthDays(month,year);
  1843.      d0              d0    d1
  1844.  
  1845.     unsigned short HeisMonthDays(const unsigned short month,
  1846.         const int year);
  1847.  
  1848.    FUNCTION
  1849.     HeisMonthDays returns the number of days a month in
  1850.     a specified year has.
  1851.     For the year 1582 and the month 10 there are only 21 days,
  1852.     because of the Gregorian-reform 10 days are deleted from
  1853.     the month (for more - look out for books about this!)
  1854.  
  1855.    INPUTS
  1856.     month - The month from which you want to get the number of days.
  1857.     year  - The year in which the month is.
  1858.  
  1859.    RESULT
  1860.     days - The number of days the month uses, or 0 if you use
  1861.         an incorrect month.
  1862.  
  1863.    EXAMPLE
  1864.     ...
  1865.     days = HeisMonthDays(1,1994);
  1866.     printf("Days of January 1994 : %d\n",days);
  1867.     ...
  1868.  
  1869.    NOTES
  1870.     Use this function only for years from 8 to 8000!
  1871.  
  1872.    BUGS
  1873.     See GregorianMonthDays!
  1874.  
  1875.    SEE ALSO
  1876.     HeisLeapYear(),JulianMonthDays(),GregorianMonthDays()
  1877.  
  1878. Date/HeisToJD                                                   Date/HeisToJD
  1879.  
  1880.    NAME
  1881.     HeisToJD -- Returns the JD for a date. (V33)
  1882.  
  1883.    SYNOPSIS
  1884.     jd = HeisToJD(day,month,year);
  1885.     d0          d0   d1    d2
  1886.  
  1887.     unsigned long HeisToJD(const unsigned short day,
  1888.         const unsigned short month, const int year);
  1889.  
  1890.    FUNCTION
  1891.     Returns the JD for a Heis date.
  1892.  
  1893.    INPUTS
  1894.     day      - day of the date to convert
  1895.     month    - month of the date to convert
  1896.     year     - year of the date to convert
  1897.  
  1898.    RESULT
  1899.     jd - This is the JD
  1900.  
  1901.    EXAMPLE
  1902.     ...
  1903.     jd = HeisToJD(23,1,1994);
  1904.     ...
  1905.  
  1906.    NOTES
  1907.     It is better to use this function only from 8 to 3268!
  1908.  
  1909.    BUGS
  1910.     unknown.
  1911.  
  1912.    SEE ALSO
  1913.     HSYearToJD(),HYearToScaliger(),HeisDayDiff(),JulianToJD(),HeisToJD()
  1914.  
  1915. Date/HeisWeek                                                   Date/HeisWeek
  1916.  
  1917.    NAME
  1918.     HeisWeek -- Gets the number of the week for a specified date. (V33)
  1919.  
  1920.    SYNOPSIS
  1921.     weeknr = HeisWeek(day,month,year);
  1922.       d0           d0  d1    d2
  1923.  
  1924.     unsigned short HeisWeek(const unsigned short day,
  1925.         const unsigned short month, const int year);
  1926.  
  1927.    FUNCTION
  1928.     HeisWeek gets the number of the week for a specified date.
  1929.  
  1930.    INPUTS
  1931.     day   - day of the date
  1932.     month - month of the date
  1933.     year  - year of the date
  1934.  
  1935.    RESULT
  1936.     week - This is the number of the week the specified date lies in.
  1937.         If the first day in a new year is a Friday, Saturday or
  1938.         Sunday, this would be the last week of the last year!
  1939.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  1940.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  1941.         first week of the next year!
  1942.  
  1943.    EXAMPLE
  1944.     ...
  1945.     weeknr = HeisWeek(4,10,1582);
  1946.     ...
  1947.  
  1948.    NOTES
  1949.     It is better only to use this function for years from 0 to 8000!
  1950.  
  1951.    BUGS
  1952.     For years < 0 errors could occur.
  1953.  
  1954.    SEE ALSO
  1955.     JulianWeek(),GregorianWeek(),HeisWeekday(),HeisDayDiff()
  1956.  
  1957. Date/HeisWeekday                                             Date/HeisWeekday
  1958.  
  1959.    NAME
  1960.     HeisWeekday -- Gets the weekday of a specified date. (V33)
  1961.  
  1962.    SYNOPSIS
  1963.     weekday = HeisWeekday(day,month,year);
  1964.       d0               d0   d1   d2
  1965.  
  1966.     Weekdays HeisWeekday(const unsigned short day, unsigned short month,
  1967.         int year);
  1968.  
  1969.    FUNCTION
  1970.     HeisWeekday gets the weekday for a specified date.
  1971.  
  1972.    INPUTS
  1973.     day   - day of the date
  1974.     month - month of the date
  1975.     year  - year of the date
  1976.  
  1977.    RESULT
  1978.     weekday - This result is of type:
  1979.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  1980.         Saturday,Sunday);
  1981.         dayerr will show you, that an error occurs!
  1982.  
  1983.    EXAMPLE
  1984.     ...
  1985.     weekday = HeisWeekday(22,1,1994);
  1986.     if (weekday == dayerr)
  1987.       {
  1988.        ...
  1989.       }
  1990.     ...
  1991.  
  1992.    NOTES
  1993.     It is better only to use this function for years from 8 to 8000!
  1994.     In this version dayerr will only occur for the lost days :)
  1995.  
  1996.    BUGS
  1997.     It is not possible to use year < 0 (see JulianWeekday() for more).
  1998.  
  1999.    SEE ALSO
  2000.     JulianWeekday(),GregorianWeekday()
  2001.  
  2002. Date/HeisYearDays                                           Date/HeisYearDays
  2003.  
  2004.    NAME
  2005.     HeisYearDays -- Gives back the number of days in a year. (V33)
  2006.  
  2007.    SYNOPSIS
  2008.     days = HeisYearDays(year);
  2009.      d0             d0
  2010.  
  2011.     unsigned int HeisYearDays(const int year);
  2012.  
  2013.    FUNCTION
  2014.     HeisYearDays gives you back the number of days in
  2015.     a specified year.
  2016.  
  2017.    INPUTS
  2018.     year  - The year in which to count the days.
  2019.  
  2020.    RESULT
  2021.     days - The number of days the year uses.
  2022.  
  2023.    EXAMPLE
  2024.     ...
  2025.     days = HeisYearDays(1994);
  2026.     printf("Days of 1994 : %d\n",days);
  2027.     ...
  2028.  
  2029.    NOTES
  2030.     It is better only to use this function for years from 8 to 8000!
  2031.  
  2032.    BUGS
  2033.     No known bugs.
  2034.  
  2035.    SEE ALSO
  2036.     HeisMonthDays(),JulianYearDays(),GregorianYearDays()
  2037.  
  2038. Date/HSYearToJD                                               Date/HSYearToJD
  2039.  
  2040.    NAME
  2041.     HSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  2042.  
  2043.    SYNOPSIS
  2044.     jd = HSYearToJD(syear);
  2045.     d0         d0
  2046.  
  2047.     unsigned long HSYearToJD(const unsigned int syear);
  2048.  
  2049.    FUNCTION
  2050.     Returns the Julianday of a Scaliger year.
  2051.  
  2052.    INPUTS
  2053.     syear     - Scaliger year
  2054.  
  2055.    RESULT
  2056.     jd - The Julianday
  2057.  
  2058.    EXAMPLE
  2059.     ...
  2060.     jd = HSYearToJD(6700);
  2061.     ...
  2062.  
  2063.    NOTES
  2064.     It is better to use this function only from 4707 to 7981!
  2065.     In this version only GSYearToJD() is called, because the
  2066.     Scaliger period is only valid to 3268
  2067.  
  2068.    BUGS
  2069.     unknown.
  2070.  
  2071.    SEE ALSO
  2072.     JSYearToJD(),GSYearToJD()
  2073.  
  2074. Date/HYearToScaliger                                     Date/HYearToScaliger
  2075.  
  2076.    NAME
  2077.     HYearToScaliger -- Returns the year as Scaliger year. (V33)
  2078.  
  2079.    SYNOPSIS
  2080.     syear = HYearToScaliger(year);
  2081.      d0             d0
  2082.  
  2083.     unsigned int HYearToScaliger(const int year);
  2084.  
  2085.    FUNCTION
  2086.     Returns the Scaliger year.
  2087.  
  2088.    INPUTS
  2089.     year     - Heis year
  2090.  
  2091.    RESULT
  2092.     syear - The Scaliger year
  2093.  
  2094.    EXAMPLE
  2095.     ...
  2096.     syear = HYearToScaliger(1994);
  2097.     ...
  2098.  
  2099.    NOTES
  2100.     It is better to use this function only from 8 to 8000!
  2101.  
  2102.    BUGS
  2103.     The Scaliger period is defined to 3268!!!.
  2104.  
  2105.    SEE ALSO
  2106.     JYearToScaliger(),GYearToScaliger()
  2107.  
  2108. Date/JDToGregorian                                         Date/JDToGregorian
  2109.  
  2110.    NAME
  2111.     JDToGregorian -- Returns the Gregorian date for a JD. (V33.095)
  2112.  
  2113.    SYNOPSIS
  2114.     JDToGregorian(jd,day,month,year);
  2115.               d0 a0   a1    a2
  2116.  
  2117.     void JDToGregorian(const unsigned long jd, unsigned short *const day,
  2118.         unsigned short *const month, int *const year);
  2119.  
  2120.     void JDToGregorian(const unsigned long jd, unsigned short &day,
  2121.         unsigned short &month, int &year);
  2122.  
  2123.    FUNCTION
  2124.     Returns the Gregorian date for a JD.
  2125.  
  2126.    INPUTS
  2127.     jd    - This is the given JD.
  2128.  
  2129.    RESULT
  2130.     day    - Day of the date.
  2131.     month    - Month of the date.
  2132.     year    - Year of the date.
  2133.  
  2134.    EXAMPLE
  2135.     ...
  2136.     JDToGregorian(2299161,&day,&month,&year);
  2137.     ...
  2138.  
  2139.    NOTES
  2140.     It is better to use this function only from 1718867 to 2889835!
  2141.  
  2142.    BUGS
  2143.     unknown.
  2144.  
  2145.    SEE ALSO
  2146.     JDToJulian(),JDToHeis()
  2147.  
  2148. Date/JDToHeis                                                   Date/JDToHeis
  2149.  
  2150.    NAME
  2151.     JDToHeis -- Returns the Heis date for a JD. (V33.095)
  2152.  
  2153.    SYNOPSIS
  2154.     JDToHeis(jd,day,month,year);
  2155.          d0 a0   a1    a2
  2156.  
  2157.     void JDToHeis(const unsigned long jd, unsigned short *const day,
  2158.         unsigned short *const month, int *const year);
  2159.  
  2160.     void JDToHeis(const unsigned long jd, unsigned short &day,
  2161.         unsigned short &month, int &year);
  2162.  
  2163.    FUNCTION
  2164.     Returns the Heis date for a JD.
  2165.  
  2166.    INPUTS
  2167.     jd    - This is the given JD.
  2168.  
  2169.    RESULT
  2170.     day    - Day of the date.
  2171.     month    - Month of the date.
  2172.     year    - Year of the date.
  2173.  
  2174.    EXAMPLE
  2175.     ...
  2176.     JDToHeis(2299161,&day,&month,&year);
  2177.     ...
  2178.  
  2179.    NOTES
  2180.     At the moment this is only a dummy to JDToGregorian, so:
  2181.     It is better to use this function only from 1718867 to 2889835!
  2182.  
  2183.    BUGS
  2184.     unknown.
  2185.  
  2186.    SEE ALSO
  2187.     JDToJulian(), JDToGregorian()
  2188.  
  2189. Date/JDToJulian                                               Date/JDToJulian
  2190.  
  2191.    NAME
  2192.     JDToJulian -- Returns the Julian date for a JD. (V33.095)
  2193.  
  2194.    SYNOPSIS
  2195.     JDToJulian(jd,day,month,year);
  2196.            d0 a0   a1    a2
  2197.  
  2198.     void JDToJulian(const unsigned long jd, unsigned short *const day,
  2199.         unsigned short *const month, int *const year);
  2200.  
  2201.     void JDToJulian(const unsigned long jd, unsigned short &day,
  2202.         unsigned short &month, int &year);
  2203.  
  2204.    FUNCTION
  2205.     Returns the Julian date for a JD.
  2206.  
  2207.    INPUTS
  2208.     jd    - This is the given JD.
  2209.  
  2210.    RESULT
  2211.     day    - Day of the date.
  2212.     month    - Month of the date.
  2213.     year    - Year of the date.
  2214.  
  2215.    EXAMPLE
  2216.     ...
  2217.     JDToJulian(2299160,&day,&month,&year);
  2218.     ...
  2219.  
  2220.    NOTES
  2221.     It is better to use this function only from 1718867 to 2299160!
  2222.  
  2223.    BUGS
  2224.     unknown.
  2225.  
  2226.    SEE ALSO
  2227.     JDToGregorian(),JDToHeis()
  2228.  
  2229. Date/JDtoMJD                                                     Date/JDtoMJD
  2230.  
  2231.    NAME
  2232.     JDtoMJD -- Switches from JD to MJD. (V33)
  2233.  
  2234.    SYNOPSIS
  2235.     mjd = JDtoMJD(jd);
  2236.     d0          d0
  2237.  
  2238.     unsigned long JDtoMJD(const unsigned long jd);
  2239.  
  2240.    FUNCTION
  2241.     Returns the Modified Julianday of a Julianday.
  2242.  
  2243.    INPUTS
  2244.     jd - Julianday
  2245.  
  2246.    RESULT
  2247.     mjd - The Modified Julianday
  2248.  
  2249.    EXAMPLE
  2250.     ...
  2251.     mjd = JDtoMJD(2449354);
  2252.     ...
  2253.  
  2254.    NOTES
  2255.     none
  2256.  
  2257.    BUGS
  2258.     Only use this function for jd > 2400001, because mjd is only
  2259.     defined for this, otherwise system will crash!
  2260.  
  2261.    SEE ALSO
  2262.     MJDtoJD()
  2263.  
  2264. Date/JDToTime                                                   Date/JDToTime
  2265.  
  2266.    NAME
  2267.     JDToTime -- Returns the real time for a JD time. (V33)
  2268.  
  2269.    SYNOPSIS
  2270.     JDToTime(jd,rhour,rmin,rsec);
  2271.          d0  a0    a1   a2
  2272.  
  2273.     void JDToTime(float jd, unsigned short *const rhour,
  2274.         unsigned short *const rmin, unsigned short *const rsec);
  2275.  
  2276.     void JDToTime(float jd, unsigned short &rhour, unsigned short &rmin,
  2277.         unsigned short &rsec);
  2278.  
  2279.    FUNCTION
  2280.     Returns the real time for a JD time.
  2281.  
  2282.    INPUTS
  2283.     jd - JD time
  2284.  
  2285.    RESULT
  2286.     rhour - 24 hour real time
  2287.     rmin  - real minutes
  2288.     rsec  - real seconds
  2289.  
  2290.    EXAMPLE
  2291.     ...
  2292.     JDToTime(0.76543,&rhour,&rmin,&rsec);
  2293.     ...
  2294.  
  2295.    NOTES
  2296.     none.
  2297.  
  2298.    BUGS
  2299.     If jd is > 0 (including days) there will be occur arithmetic bugs!
  2300.  
  2301.    SEE ALSO
  2302.     TimeToJD()
  2303.  
  2304. Date/JSYearToJD                                               Date/JSYearToJD
  2305.  
  2306.    NAME
  2307.     JSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  2308.  
  2309.    SYNOPSIS
  2310.     jd = JSYearToJD(syear);
  2311.     d0         d0
  2312.  
  2313.     unsigned long JSYearToJD(const unsigned int syear);
  2314.  
  2315.    FUNCTION
  2316.     Returns the Julianday of a Scaliger year.
  2317.  
  2318.    INPUTS
  2319.     syear     - Scaliger year
  2320.  
  2321.    RESULT
  2322.     jd - The Julianday
  2323.  
  2324.    EXAMPLE
  2325.     ...
  2326.     jd = JSYearToJD(4800);
  2327.     ...
  2328.  
  2329.    NOTES
  2330.     It is better to use this function only from 4707 to 6295!
  2331.  
  2332.    BUGS
  2333.     unknown.
  2334.  
  2335.    SEE ALSO
  2336.     GSYearToJD(),HSYearToJD()
  2337.  
  2338. Date/JulianDayDiff                                         Date/JulianDayDiff
  2339.  
  2340.    NAME
  2341.     JulianDayDiff -- Calculates the days between 2 dates. (V33)
  2342.  
  2343.    SYNOPSIS
  2344.     days = JulianDayDiff(day1,month1,year1,day2,month2,year2);
  2345.      d0              d0    d1    d2    d3    d4    d5
  2346.  
  2347.     long JulianDayDiff(const unsigned short day1, unsigned short month1,
  2348.         int year1, const unsigned short day2, unsigned short month2,
  2349.         int year2);
  2350.  
  2351.    FUNCTION
  2352.     JulianDayDiff gives you back the number of days between
  2353.     two specified dates.
  2354.  
  2355.    INPUTS
  2356.     day1   - day of the first date
  2357.     month1 - month of the first date
  2358.     year1  - year of the first date
  2359.     day2   - day of the second date
  2360.     month2 - month of the second month
  2361.     year2  - year of the second date
  2362.  
  2363.    RESULT
  2364.     days - The number of days between the two dates
  2365.         (positive if date1 <= date2).
  2366.  
  2367.    EXAMPLE
  2368.     ...
  2369.     days = JulianDayDiff(18,9,1970,22,1,1994);
  2370.     printf("Age of Kai Hofmann in days : %d\n",days);
  2371.     ...
  2372.  
  2373.    NOTES
  2374.     It is better only to use this function for years from 8 to 1582!
  2375.  
  2376.    BUGS
  2377.     No known bugs.
  2378.  
  2379.    SEE ALSO
  2380.     JulianLeapYear(),JulianMonthDays(),JulianYearDays(),
  2381.     GregorianDayDiff(),HeisDayDiff()
  2382.  
  2383. Date/JulianDaysAfterWeekday                       Date/JulianDaysAfterWeekday
  2384.  
  2385.    NAME
  2386.     JulianDaysAfterWeekday -- Returns the diff to the wday after. (V33)
  2387.  
  2388.    SYNOPSIS
  2389.     days = JulianDaysAfterWeekday(day,month,year,weekday);
  2390.      d0                   d0   d1   d2     d3
  2391.  
  2392.     unsigned short JulianDaysAfterWeekday(const unsigned short day,
  2393.         const unsigned short month, const int year,
  2394.         const Weekdays weekday);
  2395.  
  2396.    FUNCTION
  2397.     Returns the days to the weekday after the specified date.
  2398.     If you specify the 22.1.1994 (Saturday) and Thursday
  2399.     you get back 5!
  2400.     If you specify the 22.1.1994 and Saturday you get back 0
  2401.     (the same day)!
  2402.  
  2403.    INPUTS
  2404.     day     - day of the date
  2405.     month   - month of the date
  2406.     year    - year of the date
  2407.     weekday - weekday to search for building difference
  2408.  
  2409.    RESULT
  2410.     days - The days after to the searched weekday.
  2411.  
  2412.    EXAMPLE
  2413.     ...
  2414.     days = JulianDaysAfterWeekday(22,1,1994,Thursday);
  2415.     ...
  2416.  
  2417.    NOTES
  2418.     It is better to use this function only from 8 to 1582!
  2419.  
  2420.    BUGS
  2421.     See JulianWeekday()!
  2422.  
  2423.    SEE ALSO
  2424.     JulianWeekday(),GregorianDaysAfterWeekday(),HeisDaysAfterWeekday()
  2425.  
  2426. Date/JulianDaysBeforeWeekday                     Date/JulianDaysBeforeWeekday
  2427.  
  2428.    NAME
  2429.     JulianDaysBeforeWeekday -- Returns the diff to the wday before. (V33)
  2430.  
  2431.    SYNOPSIS
  2432.     days = JulianDaysBeforeWeekday(day,month,year,weekday);
  2433.      d0                d0  d1    d2    d3
  2434.  
  2435.     unsigned short JulianDaysBeforeWeekday(const unsigned short day,
  2436.         const unsigned short month, const int year,
  2437.         const Weekdays weekday);
  2438.  
  2439.    FUNCTION
  2440.     Returns the days to the weekday before the specified date.
  2441.     If you specify the 22.1.1994 (Saturday) and Thursday
  2442.     you get back 2!
  2443.     If you specify the 22.1.1994 and Saturday you get back 0
  2444.     (the same day)!
  2445.  
  2446.    INPUTS
  2447.     day     - day of the date
  2448.     month   - month of the date
  2449.     year    - year of the date
  2450.     weekday - weekday to search for building difference
  2451.  
  2452.    RESULT
  2453.     days - The days gets you back to the searched weekday (0-6)
  2454.         If you get back an 8 an error occurs!
  2455.  
  2456.    EXAMPLE
  2457.     ...
  2458.     days = JulianDaysBeforeWeekday(22,1,1994,Thursday);
  2459.     ...
  2460.  
  2461.    NOTES
  2462.     It is better to use this function only from 8 to 02.1582!
  2463.  
  2464.    BUGS
  2465.     See JulianWeekday()!
  2466.  
  2467.    SEE ALSO
  2468.     JulianWeekday(),GregorianDaysBeforeWeekday(),HeisDaysBeforeWeekday()
  2469.  
  2470. Date/JulianDiffDate                                       Date/JulianDiffDate
  2471.  
  2472.    NAME
  2473.     JulianDiffDate -- Returns the date for a diff to another date. (V33)
  2474.  
  2475.    SYNOPSIS
  2476.     JulianDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  2477.             d0   d1   d2     d3     a0    a1    a2
  2478.  
  2479.     void JulianDiffDate(const unsigned short day,
  2480.         const unsigned short month, const int year, int days,
  2481.         unsigned short *const dday, unsigned short *const dmonth,
  2482.         int *const dyear);
  2483.  
  2484.     void JulianDiffDate(const unsigned short day,
  2485.         const unsigned short month, const int year, int days,
  2486.         unsigned short &dday, unsigned short &dmonth, int &dyear);
  2487.  
  2488.    FUNCTION
  2489.     Returns the date which lies diffdays before/after the specified date.
  2490.  
  2491.    INPUTS
  2492.     day      - day of the date
  2493.     month    - month of the date
  2494.     year     - year of the date
  2495.     diffdays - difference to the date in days
  2496.  
  2497.    RESULT
  2498.     dday   - Destination day
  2499.     dmonth - Destination month
  2500.     dyear  - Destination year
  2501.  
  2502.    EXAMPLE
  2503.     ...
  2504.     JulianDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  2505.     ...
  2506.  
  2507.    NOTES
  2508.     It is better to use this function only from 8 to 1582!
  2509.  
  2510.    BUGS
  2511.     unknown.
  2512.  
  2513.    SEE ALSO
  2514.     JulianDayDiff(),JulianMonthDays(),GregorianDiffDate(),HeisDiffDate()
  2515.  
  2516. Date/JulianEaster                                           Date/JulianEaster
  2517.  
  2518.    NAME
  2519.     JulianEaster -- Returns the date of Easter in a year (V33.097)
  2520.  
  2521.    SYNOPSIS
  2522.     JulianEaster(year,dday,dmonth);
  2523.               d0   a0    a1
  2524.  
  2525.     void JulianEaster(const int year, unsigned short *const dday,
  2526.         unsigned short *const dmonth);
  2527.  
  2528.     void JulianEaster(const int year, unsigned short &dday,
  2529.         unsigned short &dmonth);
  2530.  
  2531.    FUNCTION
  2532.     Returns the date of Easter for a specified year.
  2533.  
  2534.    INPUTS
  2535.     year  - Easter is calculated for this year
  2536.  
  2537.    RESULT
  2538.     dday   - day of Easter Sunday
  2539.     dmonth - month of Easter Sunday
  2540.  
  2541.    EXAMPLE
  2542.     ...
  2543.     JulianEaster(1994,&dday,&dmonth);
  2544.     ...
  2545.  
  2546.    NOTES
  2547.     Use this only for 31 to 1582!
  2548.  
  2549.    BUGS
  2550.     None.
  2551.  
  2552.    SEE ALSO
  2553.     GregorianEaster(),HeisEaster()
  2554.  
  2555. Date/JulianLeapYear                                       Date/JulianLeapYear
  2556.  
  2557.    NAME
  2558.     JulianLeapYear -- Checks if a year is a leap year. (V33)
  2559.  
  2560.    SYNOPSIS
  2561.     leapyear = JulianLeapYear(year);
  2562.        d0               d0
  2563.  
  2564.     bool JulianLeapYear(const int year);
  2565.  
  2566.    FUNCTION
  2567.     JulianLeapYear checks if a year is a leap year in the Julian calendar
  2568.     For years after Chr. it checks if the year is devideable by 4.
  2569.     For years before Chr. a leap year must have a modulo 4 value of 1
  2570.  
  2571.    INPUTS
  2572.     year - The year which should be checked (from -32768 to 32767)
  2573.         I think only values from 8 to 32767 are valid, because of
  2574.         the variant that was done by Augustus!
  2575.  
  2576.    RESULT
  2577.     leapyear - TRUE if the year is a leap year, otherwise false.
  2578.  
  2579.    EXAMPLE
  2580.     ...
  2581.     if (JulianLeapYear(1994))
  2582.       printf("leap year!\n");
  2583.     else
  2584.       printf("no leap year!\n");
  2585.     ...
  2586.  
  2587.    NOTES
  2588.     A year is 365.25 days long!
  2589.     Use this function only for values from 8 to 1582!
  2590.  
  2591.    BUGS
  2592.     No known bugs.
  2593.  
  2594.    SEE ALSO
  2595.     GregorianLeapYear(),HeisLeapYear()
  2596.  
  2597. Date/JulianMonthDays                                     Date/JulianMonthDays
  2598.  
  2599.    NAME
  2600.     JulianMonthDays -- Returns the number of days of a month. (V33)
  2601.  
  2602.    SYNOPSIS
  2603.     days = JulianMonthDays(month,year);
  2604.      d0            d0    d1
  2605.  
  2606.     unsigned short JulianMonthDays(const unsigned short month,
  2607.         const int year);
  2608.  
  2609.    FUNCTION
  2610.     JulianMonthDays gives returns the number of days a month in
  2611.     a specified year has.
  2612.  
  2613.    INPUTS
  2614.     month - The month from which you want to get the number of days.
  2615.     year  - The year in which the month is.
  2616.  
  2617.    RESULT
  2618.     days - The number of days the month uses, or 0 if you use
  2619.         an incorrect month.
  2620.  
  2621.    EXAMPLE
  2622.     ...
  2623.     days = JulianMonthDays(1,1994);
  2624.     printf("Days of January 1994 : %d\n",days);
  2625.     ...
  2626.  
  2627.    NOTES
  2628.     It is better only to use this function for years from 8 to 09.1582!
  2629.  
  2630.    BUGS
  2631.     No known bugs.
  2632.  
  2633.    SEE ALSO
  2634.     JulianLeapYear(),GregorianMonthDays(),HeisMonthDays()
  2635.  
  2636. Date/JulianToJD                                               Date/JulianToJD
  2637.  
  2638.    NAME
  2639.     JulianToJD -- Returns the JD for a date. (V33)
  2640.  
  2641.    SYNOPSIS
  2642.     jd = JulianToJD(day,month,year);
  2643.     d0        d0   d1    d2
  2644.  
  2645.     unsigned long JulianToJD(const unsigned short day,
  2646.         const unsigned short month, const int year);
  2647.  
  2648.    FUNCTION
  2649.     Returns the JD for a Julian date.
  2650.  
  2651.    INPUTS
  2652.     day      - day of the date to convert
  2653.     month    - month of the date to convert
  2654.     year     - year of the date to convert
  2655.  
  2656.    RESULT
  2657.     jd - This is the JD
  2658.  
  2659.    EXAMPLE
  2660.     ...
  2661.     jd = JulianToJD(23,1,1994);
  2662.     ...
  2663.  
  2664.    NOTES
  2665.     It is better to use this function only from 8 to 1582!
  2666.  
  2667.    BUGS
  2668.     unknown.
  2669.  
  2670.    SEE ALSO
  2671.     JSYearToJD(),JYearToScaliger(),JulianDayDiff(),GregorianToJD(),
  2672.     HeisToJD()
  2673.  
  2674. Date/JulianWeek                                               Date/JulianWeek
  2675.  
  2676.    NAME
  2677.     JulianWeek -- Gets the number of the week for a specified date. (V33)
  2678.  
  2679.    SYNOPSIS
  2680.     weeknr = JulianWeek(day,month,year);
  2681.       d0            d0    d1   d2
  2682.  
  2683.     unsigned short JulianWeek(const unsigned short day,
  2684.         const unsigned short month, const int year);
  2685.  
  2686.    FUNCTION
  2687.     JulianWeek gets the number of the week for a specified date.
  2688.  
  2689.    INPUTS
  2690.     day   - day of the date
  2691.     month - month of the date
  2692.     year  - year of the date
  2693.  
  2694.    RESULT
  2695.     week - This is the number of the week the specified date lies in.
  2696.         If the first day in a new year is a Friday, Saturday or
  2697.         Sunday, this would be the last week of the last year!
  2698.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  2699.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  2700.         first week of the next year!
  2701.  
  2702.    EXAMPLE
  2703.     ...
  2704.     weeknr = JulianWeek(4,10,1582);
  2705.     ...
  2706.  
  2707.    NOTES
  2708.     It is is better only to use this function for years from 0 to 1582!
  2709.  
  2710.    BUGS
  2711.     For years < 0 errors could occur.
  2712.  
  2713.    SEE ALSO
  2714.     GregorianWeek(),HeisWeek(),JulianWeekday(),JulianDayDiff()
  2715.  
  2716. Date/JulianWeekday                                         Date/JulianWeekday
  2717.  
  2718.    NAME
  2719.     JulianWeekday -- Gets the weekday of a specified date. (V33)
  2720.  
  2721.    SYNOPSIS
  2722.     weekday = JulianWeekday(day,month,year);
  2723.       d0             d0   d1   d2
  2724.  
  2725.     Weekdays JulianWeekday(const unsigned short day,
  2726.         unsigned short month, int year);
  2727.  
  2728.    FUNCTION
  2729.     JulianWeekday gets the weekday for a specified date.
  2730.  
  2731.    INPUTS
  2732.     day   - day of the date
  2733.     month - month of the date
  2734.     year  - year of the date
  2735.  
  2736.    RESULT
  2737.     weekday - This result is of type:
  2738.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  2739.         Saturday,Sunday);
  2740.         dayerr will show you, that an error occurs!
  2741.  
  2742.    EXAMPLE
  2743.     ...
  2744.     weekday = JulianWeekday(4,10,1582);
  2745.     if (weekday == dayerr)
  2746.       {
  2747.        ...
  2748.       }
  2749.     ...
  2750.  
  2751.    NOTES
  2752.     It is better only to use this function for years from 1 to 02.1582!
  2753.     In this version no dayerr will occur!
  2754.  
  2755.    BUGS
  2756.     For years <= 0 errors could occur, or systemcrashs(?).
  2757.  
  2758.    SEE ALSO
  2759.     GregorianWeekday(),HeisWeekday()
  2760.  
  2761. Date/JulianYearDays                                       Date/JulianYearDays
  2762.  
  2763.    NAME
  2764.     JulianYearDays -- Gives back the number of days in a year. (V33)
  2765.  
  2766.    SYNOPSIS
  2767.     days = JulianYearDays(year);
  2768.      d0               d0
  2769.  
  2770.     unsigned int JulianYearDays(const int year);
  2771.  
  2772.    FUNCTION
  2773.     JulianYearDays gives you back the number of days in
  2774.     a specified year.
  2775.  
  2776.    INPUTS
  2777.     year  - The year in which to count the days.
  2778.  
  2779.    RESULT
  2780.     days - The number of days the year uses.
  2781.  
  2782.    EXAMPLE
  2783.     ...
  2784.     days = JulianYearDays(1994);
  2785.     printf("Days of 1994 : %d\n",days);
  2786.     ...
  2787.  
  2788.    NOTES
  2789.     It is better only to use this function for years from 8 to 1581!
  2790.  
  2791.    BUGS
  2792.     No known bugs.
  2793.  
  2794.    SEE ALSO
  2795.     JulianMonthDays(),GregorianYearDays(),HeisYearDays()
  2796.  
  2797. Date/JYearToScaliger                                     Date/JYearToScaliger
  2798.  
  2799.    NAME
  2800.     JYearToScaliger -- Returns the year as Scaliger year. (V33)
  2801.  
  2802.    SYNOPSIS
  2803.     syear = JYearToScaliger(year);
  2804.      d0             d0
  2805.  
  2806.     unsigned int JYearToScaliger(const int year);
  2807.  
  2808.    FUNCTION
  2809.     Returns the Scaliger year.
  2810.  
  2811.    INPUTS
  2812.     year     - Julian year
  2813.  
  2814.    RESULT
  2815.     syear - The Scaliger year
  2816.  
  2817.    EXAMPLE
  2818.     ...
  2819.     syear = JYearToScaliger(1582);
  2820.     ...
  2821.  
  2822.    NOTES
  2823.     It is better to use this function only from 8 to 1582!
  2824.  
  2825.    BUGS
  2826.     unknown.
  2827.  
  2828.    SEE ALSO
  2829.     GYearToScaliger(),HYearToScaliger()
  2830.  
  2831. Date/LMT                                                             Date/LMT
  2832.  
  2833.    NAME
  2834.     LMT -- Calculates your local time in your timezone (V33)
  2835.  
  2836.    SYNOPSIS
  2837.     secs = LMT(secs,meridian,pos);
  2838.      d0        d0     d1    d2
  2839.  
  2840.     unsigned long LMT(const unsigned long secs,
  2841.         const float meridiandegree, const float posdegree);
  2842.  
  2843.    FUNCTION
  2844.     Calculates your Local Mean Time of your place!
  2845.  
  2846.    INPUTS
  2847.     secs     - Seconds of the running day (hours*3600+min*60+sec)
  2848.     meridian - Degrees of your timezone-meridian
  2849.     pos      - Degrees of your place
  2850.  
  2851.    RESULT
  2852.     secs - Local seconds of the running day
  2853.  
  2854.    EXAMPLE
  2855.     ...
  2856.     secs = LMT(76080,-15.0,-8.923055556);
  2857.     ...
  2858.  
  2859.    NOTES
  2860.     none
  2861.  
  2862.    BUGS
  2863.     No errorcheck, if you put in valid degrees (-180 to +180)
  2864.  
  2865.    SEE ALSO
  2866.  
  2867.  
  2868. Date/MJDtoJD                                                     Date/MJDtoJD
  2869.  
  2870.    NAME
  2871.     MJDtoJD -- Switches from MJD to JD. (V33)
  2872.  
  2873.    SYNOPSIS
  2874.     jd = MJDtoJD(mjd);
  2875.     d0         d0
  2876.  
  2877.     unsigned long MJDtoJD(const unsigned long mjd);
  2878.  
  2879.    FUNCTION
  2880.     Returns the Julianday of a Modified Julianday.
  2881.  
  2882.    INPUTS
  2883.     mjd - Modified Julianday
  2884.  
  2885.    RESULT
  2886.     jd - The Julianday
  2887.  
  2888.    EXAMPLE
  2889.     ...
  2890.     jd = MJDtoJD(49353);
  2891.     ...
  2892.  
  2893.    NOTES
  2894.     none
  2895.  
  2896.    BUGS
  2897.     unknown.
  2898.  
  2899.    SEE ALSO
  2900.     JDtoMJD()
  2901.  
  2902. Date/MonthShortText                                       Date/MonthShortText
  2903.  
  2904.    NAME
  2905.     MonthShortText -- Get the month as short text string. (V33.092)
  2906.  
  2907.    SYNOPSIS
  2908.     maxlen = MonthShortText(month,mtext,lang);
  2909.      d0                       d0   a0    d1
  2910.  
  2911.     unsigned short MonthShortText(const unsigned short month,
  2912.         char *const mtext, Languages lang);
  2913.  
  2914.    FUNCTION
  2915.     This function gets the short text string for the month-number.
  2916.  
  2917.    INPUTS
  2918.     month - Month to transform into a string.
  2919.     mtext - Pointer to a string to fill in the short month-text.
  2920.     lang  - Language for which you want the short month-text.
  2921.  
  2922.    RESULT
  2923.     maxlen - Maximum possible length for the short month-string, this
  2924.         should help you if you want to justify the string right or if
  2925.         you want to center it (Normal is three!).
  2926.         0 indicates an error!
  2927.  
  2928.    EXAMPLE
  2929.     ...
  2930.     char mtxt[4];
  2931.     ...
  2932.     maxlen = MonthShortText(12,&mtxt,English);
  2933.     ...
  2934.  
  2935.    NOTES
  2936.     Available languages:
  2937.     Locale    : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2938.                 and other systems it will return English text!
  2939.     English
  2940.     Deutsch
  2941.     français  : For non ISO8859_Latin1-systems this is called francais!
  2942.     español   : For non ISO8859_Latin1-systems this is called espanol!
  2943.     português : For non ISO8859_Latin1-systems this is called portugues!
  2944.     dansk
  2945.     italiano
  2946.     nederlands
  2947.     norsk
  2948.     svenska
  2949.     polski
  2950.     suomalainen
  2951.  
  2952.    BUGS
  2953.     In this version there is no check, if there is enough space in
  2954.     wtext!
  2955.  
  2956.    SEE ALSO
  2957.     WeekdayText(),WeekdayShortText(),MonthText()
  2958.  
  2959. Date/MonthText                                                 Date/MonthText
  2960.  
  2961.    NAME
  2962.     MonthText -- Get the month as text string. (V33.091)
  2963.  
  2964.    SYNOPSIS
  2965.     maxlen = MonthText(month,mtext,lang);
  2966.      d0                 d0   a0    d1
  2967.  
  2968.     unsigned short MonthText(const unsigned short month,
  2969.         char *const mtext, Languages lang);
  2970.  
  2971.    FUNCTION
  2972.     This function gets the text string for the month-number.
  2973.  
  2974.    INPUTS
  2975.     month - Month to transform into a string.
  2976.     mtext - Pointer to a string to fill in the month-text.
  2977.     lang  - Language for which you want the month-text.
  2978.  
  2979.    RESULT
  2980.     maxlen - Maximum possible length for the month-string, this should
  2981.         help you if you want to justify the string right or if you
  2982.         want to center it!
  2983.         0 indicates an error!
  2984.  
  2985.    EXAMPLE
  2986.     ...
  2987.     char mtxt[20];
  2988.     ...
  2989.     maxlen = MonthText(12,&mtxt,English);
  2990.     ...
  2991.  
  2992.    NOTES
  2993.     Available languages:
  2994.     Locale    : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2995.                 and other systems it will return English text!
  2996.     English
  2997.     Deutsch
  2998.     français  : For non ISO8859_Latin1-systems this is called francais!
  2999.     español   : For non ISO8859_Latin1-systems this is called espanol!
  3000.     português : For non ISO8859_Latin1-systems this is called portugues!
  3001.     dansk
  3002.     italiano
  3003.     nederlands
  3004.     norsk
  3005.     svenska
  3006.     polski
  3007.     suomalainen
  3008.  
  3009.    BUGS
  3010.     In this version there is no check, if there is enough space in
  3011.     wtext!
  3012.  
  3013.    SEE ALSO
  3014.     WeekdayText(),WeekdayShortText(),MonthShortText()
  3015.  
  3016. Date/ScaligerYearToG                                     Date/ScaligerYearToG
  3017.  
  3018.    NAME
  3019.     ScaligerYearToG -- Returns the Scaliger year as Gregorian year. (V33)
  3020.  
  3021.    SYNOPSIS
  3022.     year = ScaligerYearToG(syear);
  3023.      d0            d0
  3024.  
  3025.     int ScaligerYearToG(const unsigned int syear);
  3026.  
  3027.    FUNCTION
  3028.     Returns the Gregorian year of a Scaliger year.
  3029.  
  3030.    INPUTS
  3031.     syear     - Scaliger year
  3032.  
  3033.    RESULT
  3034.     year - The Gregorian year
  3035.  
  3036.    EXAMPLE
  3037.     ...
  3038.     year = ScaligerYearToG(6400);
  3039.     ...
  3040.  
  3041.    NOTES
  3042.     It is better to use this function only from 4707 to 7981!
  3043.  
  3044.    BUGS
  3045.     unknown.
  3046.  
  3047.    SEE ALSO
  3048.     ScaligerYearToJ(),ScaligerYearToH()
  3049.  
  3050. Date/ScaligerYearToH                                     Date/ScaligerYearToH
  3051.  
  3052.    NAME
  3053.     ScaligerYearToH -- Returns the Scaliger year as Heis year. (V33)
  3054.  
  3055.    SYNOPSIS
  3056.     year = ScaligerYearToH(syear);
  3057.      d0            d0
  3058.  
  3059.     int ScaligerYearToH(const unsigned int syear);
  3060.  
  3061.    FUNCTION
  3062.     Returns the Heis year of a Scaliger year.
  3063.  
  3064.    INPUTS
  3065.     syear     - Scaliger year
  3066.  
  3067.    RESULT
  3068.     year - The Heis year
  3069.  
  3070.    EXAMPLE
  3071.     ...
  3072.     year = ScaligerYearToH(7000);
  3073.     ...
  3074.  
  3075.    NOTES
  3076.     It is better to use this function only from 4707 to 7981!
  3077.  
  3078.    BUGS
  3079.     unknown.
  3080.  
  3081.    SEE ALSO
  3082.     ScaligerYearToJ(),ScaligerYearToG()
  3083.  
  3084. Date/ScaligerYearToJ                                     Date/ScaligerYearToJ
  3085.  
  3086.    NAME
  3087.     ScaligerYearToJ -- Returns the Scaliger year as Julian year. (V33)
  3088.  
  3089.    SYNOPSIS
  3090.     year = ScaligerYearToJ(syear);
  3091.      d0            d0
  3092.  
  3093.     int ScaligerYearToJ(const unsigned int syear);
  3094.  
  3095.    FUNCTION
  3096.     Returns the Julian year of a Scaliger year.
  3097.  
  3098.    INPUTS
  3099.     syear     - Scaliger year
  3100.  
  3101.    RESULT
  3102.     year - The Julian year
  3103.  
  3104.    EXAMPLE
  3105.     ...
  3106.     year = ScaligerYearToJ(4800);
  3107.     ...
  3108.  
  3109.    NOTES
  3110.     It is better to use this function only from 4707 to 6295!
  3111.  
  3112.    BUGS
  3113.     unknown.
  3114.  
  3115.    SEE ALSO
  3116.     ScaligerYearToG(),ScaligerYearToH()
  3117.  
  3118. Date/SecToTime                                                 Date/SecToTime
  3119.  
  3120.    NAME
  3121.     SecToTime -- Returns the time from seconds (V33)
  3122.  
  3123.    SYNOPSIS
  3124.     SecToTime(secs,hour,min,sec);
  3125.            d0   a0  a1  a2
  3126.  
  3127.     void SecToTime(unsigned long secs, unsigned short *const hour,
  3128.         unsigned short *const min, unsigned short *const sec);
  3129.  
  3130.     void SecToTime(unsigned long secs, unsigned short &hour,
  3131.         unsigned short &min, unsigned short &sec);
  3132.  
  3133.    FUNCTION
  3134.     Gives you back the time from the specified seconds
  3135.  
  3136.    INPUTS
  3137.     secs - Time in seconds
  3138.  
  3139.    RESULT
  3140.     hour - hours (0-23)
  3141.     min  - minutes (0-59)
  3142.     sec  - seconds (0-59)
  3143.  
  3144.    EXAMPLE
  3145.     ...
  3146.     SecToTime(76860,&hour,&min,&sec);
  3147.     ...
  3148.  
  3149.    NOTES
  3150.     Don't forget to convert 24h time to AM/PM time if needed!
  3151.  
  3152.    BUGS
  3153.     No errorcheck, if you use a valid time
  3154.  
  3155.    SEE ALSO
  3156.     TimeToSec()
  3157.  
  3158. Date/SetCountry                                               Date/SetCountry
  3159.  
  3160.    NAME
  3161.     SetCountry -- Sets the country defaults for the date lib. (V33.140)
  3162.  
  3163.    SYNOPSIS
  3164.     SetCountry(country);
  3165.              d0
  3166.  
  3167.     void SetCountry(const Countries country);
  3168.  
  3169.    FUNCTION
  3170.     SetCountry sets the defaults for your country.
  3171.     Like: correct start of gregorian calendar.
  3172.  
  3173.    INPUTS
  3174.     country - Country to set.
  3175.  
  3176.    RESULT
  3177.     None.
  3178.  
  3179.    EXAMPLE
  3180.     ...
  3181.     SetCountry(unknown);
  3182.     ...
  3183.  
  3184.    NOTES
  3185.     Will *not* work correct if something other than 'unknown' is set
  3186.     in the moment!
  3187.  
  3188.    BUGS
  3189.     None.
  3190.  
  3191.    SEE ALSO
  3192.  
  3193.  
  3194. Date/TimeDiff                                                   Date/TimeDiff
  3195.  
  3196.    NAME
  3197.     TimeDiff -- Returns the difference in seconds (V33)
  3198.  
  3199.    SYNOPSIS
  3200.     secs = TimeDiff(hour1,min1,sec1,hour2,min2,sec2);
  3201.      d0         d0    d1   d2   d3    d4   d5
  3202.  
  3203.     long TimeDiff(const unsigned short hour1, const unsigned short min1,
  3204.         const unsigned short sec1, const unsigned short hour2,
  3205.         const unsigned short min2, const unsigned short sec2);
  3206.  
  3207.    FUNCTION
  3208.     Gives you back the difference between the first and the second time
  3209.     in seconds.
  3210.  
  3211.    INPUTS
  3212.     hour1 - hours of the first time
  3213.     min1  - minutes of the first time
  3214.     sec1  - seconds of the first time
  3215.     hour2 - hours of the second time
  3216.     min2  - minutes of the second time
  3217.     sec2  - seconds of the second time
  3218.  
  3219.    RESULT
  3220.     secs - The difference betwen time1 and time1 in seconds.
  3221.  
  3222.    EXAMPLE
  3223.     ...
  3224.     secs = TimeDiff(21,15,00,22,0,0);
  3225.     ...
  3226.  
  3227.    NOTES
  3228.     Don't forget to convert AM/PM time to 24h time!
  3229.     use SecToTime() to convert the seconds back to a hour,min,secs
  3230.     format!
  3231.  
  3232.    BUGS
  3233.     No errorcheck, if you use a valid time
  3234.  
  3235.    SEE ALSO
  3236.     SecToTime(),TimeToSec()
  3237.  
  3238. Date/TimeToJD                                                   Date/TimeToJD
  3239.  
  3240.    NAME
  3241.     TimeToJD -- Returns the JD for a time. (V33)
  3242.  
  3243.    SYNOPSIS
  3244.     jd = TimeToJD(hour,min,sec);
  3245.     d0           d0   d1  d2
  3246.  
  3247.     float TimeToJD(const unsigned short hour, const unsigned short min,
  3248.         const unsigned short sec);
  3249.  
  3250.    FUNCTION
  3251.     Returns the JD for a specified time.
  3252.  
  3253.    INPUTS
  3254.     hour - hour of the time to convert
  3255.     min  - minute of the time to convert
  3256.     sec  - sec. of the time to convert
  3257.  
  3258.    RESULT
  3259.     jd - This is the JD time
  3260.  
  3261.    EXAMPLE
  3262.     ...
  3263.     jd = TimeToJD(16,33,0);
  3264.     ...
  3265.  
  3266.    NOTES
  3267.     none
  3268.  
  3269.    BUGS
  3270.     There is no check, if the specified time is a valid time!
  3271.  
  3272.    SEE ALSO
  3273.     JDToTime()
  3274.  
  3275. Date/TimeToSec                                                 Date/TimeToSec
  3276.  
  3277.    NAME
  3278.     TimeToSec -- Returns the time in seconds (V33)
  3279.  
  3280.    SYNOPSIS
  3281.     secs = TimeToSec(hour,min,sec);
  3282.      d0          d0   d1  d2
  3283.  
  3284.     unsigned long TimeToSec(const unsigned short hour,
  3285.         const unsigned short min, const unsigned short sec);
  3286.  
  3287.    FUNCTION
  3288.     Gives you back the time in seconds
  3289.  
  3290.    INPUTS
  3291.     hour - hours you want (0-23)
  3292.     min  - minutes you want (0-59)
  3293.     sec  - seconds you want (0-59)
  3294.  
  3295.    RESULT
  3296.     secs - Time in seconds
  3297.  
  3298.    EXAMPLE
  3299.     ...
  3300.     secs = TimeToSec(21,15,00);
  3301.     ...
  3302.  
  3303.    NOTES
  3304.     Don't forget to convert AM/PM time to 24h time!
  3305.  
  3306.    BUGS
  3307.     No errorcheck, if you use a valid time
  3308.  
  3309.    SEE ALSO
  3310.     SecToTime()
  3311.  
  3312. Date/TimeZoneFactor                                       Date/TimeZoneFactor
  3313.  
  3314.    NAME
  3315.     TimeZoneFactor -- Returns the value you have to add to GMT time (V33)
  3316.  
  3317.    SYNOPSIS
  3318.     addhours = TimeZoneFactor(degrees);
  3319.        d0                d0
  3320.  
  3321.     short TimeZoneFactor(const short degree);
  3322.  
  3323.    FUNCTION
  3324.     This gives you the hours you have to add to GMT time,
  3325.     specified on the fact, that a timezone is 15 degrees
  3326.     and that GMT is centered on 0 degrees!
  3327.  
  3328.    INPUTS
  3329.     degrees - Position of timezone you live in
  3330.     (from -180 east to +180 west)
  3331.  
  3332.    RESULT
  3333.     addhours - Time to add to GMT time to get your locale zone time
  3334.         (-12 to +12)
  3335.  
  3336.    EXAMPLE
  3337.     ...
  3338.     addhours = TimeZoneFactor(-8);
  3339.     ...
  3340.  
  3341.    NOTES
  3342.     none
  3343.  
  3344.    BUGS
  3345.     No errorcheck, if you put in valid degrees (-180 to +180)
  3346.     Only full degrees are supportet, keep sure that you
  3347.     round in the right way for 0.x degree places
  3348.     I am not sure about the correct +/- behaviour!!!
  3349.  
  3350.    SEE ALSO
  3351.  
  3352.  
  3353. Date/ValidGregorianDate                               Date/ValidGregorianDate
  3354.  
  3355.    NAME
  3356.     ValidGregorianDate -- Checks if the date is a valid date (V33.135)
  3357.  
  3358.    SYNOPSIS
  3359.     valid = ValidGregorianDate(day,month,year);
  3360.       d0                 d0   d1  d2
  3361.  
  3362.     bool ValidGregorianDate(const unsigned short day,
  3363.         const unsigned short month, const int year);
  3364.  
  3365.    FUNCTION
  3366.     ValidGregorianDate checks if the date is valid.
  3367.  
  3368.    INPUTS
  3369.     day   - Day of the date.
  3370.     month - Month of the date.
  3371.     year  - Year of the date.
  3372.  
  3373.    RESULT
  3374.     valid - true  : The date is ok.
  3375.         false : This is not a correct date!
  3376.  
  3377.    EXAMPLE
  3378.     ...
  3379.     if (ValidGregorianDate(29,2,2000))
  3380.       printf("ok\n");
  3381.     else
  3382.       printf("wrong date!!!\n");
  3383.     ...
  3384.  
  3385.    NOTES
  3386.     None.
  3387.  
  3388.    BUGS
  3389.     None.
  3390.  
  3391.    SEE ALSO
  3392.     ValidTime(),ValidJulianDate(),ValidHeisDate()
  3393.  
  3394. Date/ValidHeisDate                                         Date/ValidHeisDate
  3395.  
  3396.    NAME
  3397.     ValidHeisDate -- Checks if the date is a valid date (V33.135)
  3398.  
  3399.    SYNOPSIS
  3400.     valid = ValidHeisDate(day,month,year);
  3401.       d0                 d0   d1  d2
  3402.  
  3403.     bool ValidHeisDate(const unsigned short day,
  3404.         const unsigned short month, const int year);
  3405.  
  3406.    FUNCTION
  3407.     ValidHeisDate checks if the date is valid.
  3408.  
  3409.    INPUTS
  3410.     day   - Day of the date.
  3411.     month - Month of the date.
  3412.     year  - Year of the date.
  3413.  
  3414.    RESULT
  3415.     valid - true  : The date is ok.
  3416.         false : This is not a correct date!
  3417.  
  3418.    EXAMPLE
  3419.     ...
  3420.     if (ValidHeisDate(29,2,2000))
  3421.       printf("ok\n");
  3422.     else
  3423.       printf("wrong date!!!\n");
  3424.     ...
  3425.  
  3426.    NOTES
  3427.     None.
  3428.  
  3429.    BUGS
  3430.     None.
  3431.  
  3432.    SEE ALSO
  3433.     ValidTime(),ValidJulianDate(),ValidGregorianDate()
  3434.  
  3435. Date/ValidJulianDate                                     Date/ValidJulianDate
  3436.  
  3437.    NAME
  3438.     ValidJulianDate -- Checks if the date is a valid date (V33.135)
  3439.  
  3440.    SYNOPSIS
  3441.     valid = ValidJulianDate(day,month,year);
  3442.       d0                 d0   d1  d2
  3443.  
  3444.     bool ValidJulianDate(const unsigned short day,
  3445.         const unsigned short month, const int year);
  3446.  
  3447.    FUNCTION
  3448.     ValidJulianDate checks if the date is valid.
  3449.  
  3450.    INPUTS
  3451.     day   - Day of the date.
  3452.     month - Month of the date.
  3453.     year  - Year of the date.
  3454.  
  3455.    RESULT
  3456.     valid - true  : The date is ok.
  3457.         false : This is not a correct date!
  3458.  
  3459.    EXAMPLE
  3460.     ...
  3461.     if (ValidJulianDate(29,2,2000))
  3462.       printf("ok\n");
  3463.     else
  3464.       printf("wrong date!!!\n");
  3465.     ...
  3466.  
  3467.    NOTES
  3468.     None.
  3469.  
  3470.    BUGS
  3471.     None.
  3472.  
  3473.    SEE ALSO
  3474.     ValidTime(),ValidGregorianDate(),ValidHeisDate()
  3475.  
  3476. Date/ValidTime                                                 Date/ValidTime
  3477.  
  3478.    NAME
  3479.     ValidTime -- Checks if the time is a valid 24h-format time (V33.135)
  3480.  
  3481.    SYNOPSIS
  3482.     valid = ValidTime(hour,min,sec);
  3483.       d0           d0   d1  d2
  3484.  
  3485.     bool ValidTime(const unsigned short hour,
  3486.         const unsigned short min, const unsigned short sec);
  3487.  
  3488.    FUNCTION
  3489.     ValidTime checks if the time (24h format only) is valid.
  3490.  
  3491.    INPUTS
  3492.     hour - Hour of the time.
  3493.     min  - Minute of the time.
  3494.     sec  - Second of the time.
  3495.  
  3496.    RESULT
  3497.     valid - true  : The time is ok.
  3498.         false : This is not a correct time!
  3499.  
  3500.    EXAMPLE
  3501.     ...
  3502.     if (ValidTime(25,0,0))
  3503.       printf("ok\n");
  3504.     else
  3505.       printf("wrong time!!!\n");
  3506.     ...
  3507.  
  3508.    NOTES
  3509.     None.
  3510.  
  3511.    BUGS
  3512.     None.
  3513.  
  3514.    SEE ALSO
  3515.     ValidJulianDate(),ValidGregorianDate(),ValidHeisDate()
  3516.  
  3517. Date/WeekdayShortText                                   Date/WeekdayShortText
  3518.  
  3519.    NAME
  3520.     WeekdayShortText -- Get the weekday as short text string. (V33.092)
  3521.  
  3522.    SYNOPSIS
  3523.     maxlen = WeekdayShortText(wday,wtext,lang);
  3524.     d0                         d0   a0    d1
  3525.  
  3526.     unsigned short WeekdayShortText(const Weekdays wday,
  3527.     char *const wtext, Languages lang);
  3528.  
  3529.    FUNCTION
  3530.     This function gets the short text string for the weekday-number.
  3531.  
  3532.    INPUTS
  3533.     wday  - Weekday to transform into a string.
  3534.     wtext - Pointer to a string to fill in the short weekday-text.
  3535.     lang  - Language for wich you want the short weekday-text.
  3536.  
  3537.    RESULT
  3538.     maxlen - Maximum possible length for the weekday-string, this should
  3539.         help you if you want to justify the string right or if you
  3540.         want to center it! (Normal it's two or three!)
  3541.         0 indicates an error!
  3542.  
  3543.    EXAMPLE
  3544.     ...
  3545.     char wtxt[3];
  3546.     ...
  3547.     maxlen = WeekdayShortText(Monday,&wtxt,English);
  3548.     ...
  3549.  
  3550.    NOTES
  3551.     Available languages:
  3552.     Locale    : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  3553.                 and other systems it will return English text!
  3554.     English
  3555.     Deutsch
  3556.     français  : For non ISO8859_Latin1-systems this is called francais!
  3557.     español   : For non ISO8859_Latin1-systems this is called espanol!
  3558.     português : For non ISO8859_Latin1-systems this is called portugues!
  3559.     dansk
  3560.     italiano
  3561.     nederlands
  3562.     norsk
  3563.     svenska
  3564.     polski
  3565.     suomalainen
  3566.  
  3567.    BUGS
  3568.     In this version there is no check, if there is enough space in
  3569.     wtext!
  3570.  
  3571.    SEE ALSO
  3572.     WeekdayText(),MonthText(),MonthShortText()
  3573.  
  3574. Date/WeekdayText                                             Date/WeekdayText
  3575.  
  3576.    NAME
  3577.     WeekdayText -- Get the weekday as text string. (V33.091)
  3578.  
  3579.    SYNOPSIS
  3580.     maxlen = WeekdayText(wday,wtext,lang);
  3581.       d0                  d0   a0    d1
  3582.  
  3583.     unsigned short WeekdayText(const Weekdays wday, char *const wtext,
  3584.         Languages lang);
  3585.  
  3586.    FUNCTION
  3587.     This function gets the text string for the weekday-number.
  3588.  
  3589.    INPUTS
  3590.     wday  - Weekday to transform into a string.
  3591.     wtext - Pointer to a string to fill in the weekday-text.
  3592.     lang  - Language for wich you want the weekday-text.
  3593.  
  3594.    RESULT
  3595.     maxlen - Maximum possible length for the weekday-string, this should
  3596.         help you if you want to justify the string right or if you
  3597.         want to center it!
  3598.         0 indicates an error!
  3599.  
  3600.    EXAMPLE
  3601.     ...
  3602.     char wtxt[20];
  3603.     ...
  3604.     maxlen = WeekdayText(Monday,&wtxt,English);
  3605.     ...
  3606.  
  3607.    NOTES
  3608.     Available languages:
  3609.     Locale    : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  3610.                 and other systems it will return English text!
  3611.     English
  3612.     Deutsch
  3613.     français  : For non ISO8859_Latin1-systems this is called francais!
  3614.     español   : For non ISO8859_Latin1-systems this is called espanol!
  3615.     português : For non ISO8859_Latin1-systems this is called portugues!
  3616.     dansk
  3617.     italiano
  3618.     nederlands
  3619.     norsk
  3620.     svenska
  3621.     polski
  3622.     suomalainen
  3623.  
  3624.    BUGS
  3625.     In this version there is no check, if there is enough space in
  3626.     wtext!
  3627.  
  3628.    SEE ALSO
  3629.     MonthText(),WeekdayShortText(),MonthShortText()
  3630.  
  3631.