[Overview][Constants][Procedures and functions] |
Encode a year and day of year to a TDateTimevalue
Source position: dateutil.inc line 321
function TryEncodeDateDay( |
const AYear: Word; |
const ADayOfYear: Word; |
var AValue: TDateTime |
):Boolean; |
AYear |
|
Year |
ADayOfYear |
|
Day in the year |
AValue |
|
Encoded TDateTimevalue. |
Trueif the encoding was succesful, Falseif not.
TryEncodeDateDayencodes the values AYearand ADayOfYearto 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 and day of year to a DateTime value |
|
|
Encodes a DateTime value from all its parts |
|
|
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 |
|
|
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, week and day of week triplet to a TDateTimevalue |
Program Example84; { This program demonstrates the TryEncodeDateDay function } Uses SysUtils,DateUtils; Var Y,DoY : Word; TS : TDateTime; Begin DecodeDateDay(Now,Y,DoY); If TryEncodeDateDay(Y,DoY,TS) then Writeln('Today is : ',DateToStr(TS)) else Writeln('Wrong year/day of year indication'); End.