Topic Path: Symbol Reference > Functions > AddMissingYear Function
ContentsIndexHome
PreviousUpNext
AddMissingYear Function

Derives the year for a partial date value.

File
function AddMissingYear(
    const ADay: Cardinal; 
    const AMonth: Cardinal
): Cardinal;
Parameters 
Description 
ADay 
Day number for the partial date value.
 
AMonth 
Month number for the partial date value. 

Cardinal - Year number to be used for the partial date value.

AddMissingYear is a Cardinal function used to derive the year used in date values that omit the year portion of the date. 

AddMissingYear uses the year for the current date when the partial date occurs in a month prior to the current month. When the current month is the same as or subsequent to the month for the partial date, the Year number in the return value is decremented by 1. 

AddMissingYear is used in FTP directory listing parsers for formats that may omit the Year portion of a date returned in the directory listing.

TIdFTPListParseUnix

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.