help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'dateutils' (#rtl)

IsValidDateDay

Check whether a given year/day of year combination is a valid date.

Declaration

Source position: dateutil.inc line 87

function IsValidDateDay(

  const AYear: Word;

  const ADayOfYear: Word

):Boolean;

Arguments

AYear

  

Year

ADayOfYear

  

Day in the year

Function result

True if the given combination is a valid date, False otherwise.

Description

IsValidDateDay returns True if AYear and ADayOfYear form a valid date indication, or False otherwise.

AYear must be in the range 1..9999 to be valid.

The ADayOfYear value is checked to see whether it falls within the valid range of dates for AYear.

See also

IsValidDate

  

Check whether a set of values is a valid date indication.

IsValidTime

  

Check whether a set of values is a valid time indication.

IsValidDateTime

  

Check whether a set of values is a valid date and time indication.

IsValidDateWeek

  

Check whether a given year/week/day of the week combination is a valid day.

IsValidDateMonthWeek

  

Check whether a given year/month/week/day of the week combination is a valid day

Example

Program Example9;

{ This program demonstrates the IsValidDateDay function }

Uses SysUtils,DateUtils;

Var
  Y : Word;

Begin
  For Y:=1996 to 2004 do
    if  IsValidDateDay(Y,366) then
      Writeln(Y,' is a leap year');
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505