Introduction


Welcome to home of the CalCals routines, which provide a suite of functions for manipulating dates in the C programming language. The routines:

  • Are released under GNU's GPL

  • Provide support for calendars typically used in climate models

  • Use no proprietary or copyrighted code or algorithms, and do not fall under the terms of any other license.

  • The main purpose of the CalCalcs routines is to supply calendar computations for calendars used by climate models, which typically have calendars with a fixed 365 (or sometimes 360) days per year. However, CalCalcs also includes support for the Julian, Gregorian, and our standard civil calendar. No support is provided for the Hebrew, Persian, Islamic, or other more regional or historic calendars.

    Also included are replacements for the udunit library version 1 routines utCalendar and utInvCalendar, which seem to have been dropped in version 2. These routines to work for all the supported calendars.

     

    Where to go next


    You can:

  • Download the C routines

  • Read why I coded these myself instead of using an available package, such as Reingold and Dershowitz's "Calendrical Calculations" or Lance Latham's "Standard C Date/Time Library".

  • Look at the API's documentation.

  • See some example code.

  • See details on the calendars supported, including a discussion of the "year zero" problem.

  • Understand the relationship between CalCalcs and the udunits library




  • (C) 2010 David W. Pierce