[Overview][Constants][Procedures and functions][Index] |
Encode a year, week and day of week triplet to a TDateTime value
Source position: line 0
function TryEncodeDateWeek( |
const AYear: Word; |
const AWeekOfYear: Word; |
out AValue: TDateTime; |
const ADayOfWeek: Word |
):Boolean; |
const AYear: Word; |
const AWeekOfYear: Word; |
out AValue: TDateTime |
):Boolean; |
AYear |
|
Year |
AWeekOfYear |
|
Week in the year |
AValue |
|
Encoded TDateTime value |
ADayOfWeek |
|
Day of the week (default 1). |
True if the encoding was succeful, False otherwise.
AYear |
|
Year |
AWeekOfYear |
|
Week in the year |
AValue |
|
Encoded TDateTime value |
True if the encoding was succeful, False otherwise.
TryEncodeDateWeek encodes the values AYear, AWeekOfYear and ADayOfWeek to a date value and returns this value in AValue.
If the encoding was succcesful, True is returned. False is returned if any of the arguments is not valid.
|
Encodes a year, month, week of month and day of week to a DateTime value |
|
|
Encode a TDateTime value from a year, week and day of week triplet |
|
|
Encodes a DateTime value from all its parts |
|
|
Encodes a year and day of year to a DateTime value |
|
|
Encode a Year, Month, Day, Hour, minute, seconds, milliseconds tuplet to a TDateTime value |
|
|
Encode a year, month, week of month and day of week to a TDateTime value |
|
|
Encode a year and day of year to a TDateTime value |
Program Example82; { This program demonstrates the TryEncodeDateWeek function } Uses SysUtils,DateUtils; Var Y,W,Dow : Word; TS : TDateTime; Begin DecodeDateWeek(Now,Y,W,Dow); If TryEncodeDateWeek(Y,W,TS,Dow) then Writeln('Today is : ',DateToStr(TS)) else Writeln('Invalid date/week indication'); End.
lazarus-ccr.sourceforge.net |