Unit 'utility' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

CheckDate

Checks a ClockData structure for legal date.

Declaration

Source position: utility.pas line 179

function CheckDate(

  Date: PClockData

):LongWord;

Arguments

Date

  

A ClockData structure desribing the date to check.

Function result

If the date is valid, the number of seconds from midnight 1-Jan-1978 AD to the date, or 0 if the date is invalud.

Description

Examine the date described in the ClockData structure and determine whether it is a valid date. In particular this checks whether the ranges of the fields are within normal limits.

This function does not check whether the wday field of the ClockData structure is valid.

The date 01-Jan-78 00:00:00 is actually returned as invalid.

This also assumes that the ClockDate refers to a date in the Gregorian calendar. (60 sec/min, 60 min/hour, 24 hr/day, 12 months/year).

See also

Amiga2Date

  

Fill in a ClockData structure based on a system time stamp

Date2Amiga

  

Calculate seconds from 01-Jan-1978.


Documentation generated on: 2021-07-30