[Overview][Constants][Procedures and functions][Index] |
Encode a year, month, week of month and day of week to a TDateTime value
Source position: dateutil.inc line 345
function TryEncodeDateMonthWeek( |
const AYear: Word; |
const AMonth: Word; |
const AWeekOfMonth: Word; |
const ADayOfWeek: Word; |
out AValue: TDateTime |
):Boolean; |
AYear |
|
Year |
AMonth |
|
Month in the year |
AWeekOfMonth |
|
Week in the month |
ADayOfWeek |
|
Day in the week |
AValue |
|
Encoded TDateTime value |
True if the encoding was successful, False if not.
TryEncodeDateTime encodes the values AYearAMonth, WeekOfMonth,ADayOfWeek, to a date value and returns this value in AValue.
If the encoding was successful, True is returned, False if any of the arguments is not valid.
|
Decode a TDateTime value in a month, week of month and day of week |
|
|
Encodes a TDateTime value from all its parts |
|
|
Encode a TDateTime value from a year, week and day of week triplet |
|
|
Encodes a year and day of year to a TDateTime value |
|
|
Encodes a year, month, week of month and day of week to a TDateTime value |
|
|
Encode a Year, Month, Day, Hour, minute, seconds, milliseconds tuplet to a TDateTime value |
|
|
Encode a year, week and day of week triplet to a TDateTime value |
|
|
Encode a year and day of year to a TDateTime value |
|
|
Calculate which occurrence of weekday in the month a given day represents |
Program Example86; { This program demonstrates the TryEncodeDateMonthWeek function } Uses SysUtils,DateUtils; Var Y,M,Wom,Dow : Word; TS : TDateTime; Begin DecodeDateMonthWeek(Now,Y,M,WoM,DoW); If TryEncodeDateMonthWeek(Y,M,WoM,Dow,TS) then Writeln('Today is : ',DateToStr(TS)) else Writeln('Invalid year/month/week/dow indication'); End.