big_calendar

Universal gregorian calendar routines

Author Oliver "Kiste" Seitz
Adapted-by
Compiler >=2.4o

Description

The hardware RTCC present in some PIC devices is limited to years 2000...2099. 
If you want to build e.g. a time-travelling vehicle, such a clock is of little use.
This software library implements a RTCC which is valid from friday, October 15, 1582
to presumably at least the year 7000. Earlier, the julian calendar was valid. Later, the 
inaccuracy of the gregorian leap year rules may have accumulated to a whole day. 


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

  • bigcal_update_current()

    Title:     Update current time and date
    Arguments: none
    Returns:   none
    Notes:     works on global variables current_date and current_time.
    "current_time.seconds" is to be updated somehow, e.g. a timer or the like.
    This procedure updates all the other variables, depending on the
    rising value of "current_time.seconds".
    It should be called regularly. Once a second is ok, but not stricktly
    necessary. "seconds" should not overflow, so this procedure must
    be called at least once every four minutes.
    
    

  • bigcal_add_days(bigcal_datetype in out ddate, sword in distance)

    Title:     Alter a given date by a number of days
    Arguments: - Year 
     Month 
     Day 
     distance
    Returns:   A modified date (year,month,day)
    Notes:     distance can be positive, moves date to the future
    distance can be negative, moves date to the past
    +/-32768 days is a bit more than 89 years
    
    

  • bigcal_find_easter(bigcal_datetype in out edate)

    Title:     Find date of easter sunday
    Arguments: year in datetype record
    Returns:   complete datetype record with date of easter sunday
    Notes:     Calculates the date of easter sunday using formulae
    created by C.F. Gauss, modified by Dr. H. Lichtenberg
    as published by the german date and time authority
    "Physikalisch-Technische Bundesanstalt".
    
    

Functions


Related samples

Here are the list of samples which use this library:

16f68816f688_big_calendar.jal