[Overview][Constants][Procedures and functions] |
Encode a year, week and day of week triplet to a TDateTimevalue
Source position: line 0
function TryEncodeDateWeek( |
const AYear: Word; |
const AWeekOfYear: Word; |
var AValue: TDateTime; |
const ADayOfWeek: Word |
):Boolean; |
const AYear: Word; |
const AWeekOfYear: Word; |
var AValue: TDateTime |
):Boolean; |
AYear |
|
Year |
AWeekOfYear |
|
Week in the year |
AValue |
|
Encoded TDateTimevalue |
ADayOfWeek |
|
Day of the week (default 1). |
Trueif the encoding was succeful, Falseotherwise.
AYear |
|
Year |
AWeekOfYear |
|
Week in the year |
AValue |
|
Encoded TDateTimevalue |
Trueif the encoding was succeful, Falseotherwise.
TryEncodeDateWeekencodes the values AYear, AWeekOfYearand ADayOfWeekto a date value and returns this value in AValue.
If the encoding was succcesful, Trueis returned. Falseis 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 TDateTimevalue 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 TDateTimevalue |
|
|
Encode a year, month, week of month and day of week to a TDateTimevalue |
|
|
Encode a year and day of year to a TDateTimevalue |
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.