-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Milestone
Description
Implement methods that allow to initiate TDateTime in a more readable way:
date1 := TDateTime.New(2025, 11, 11).At(17, 29);
date2 := TDateTime.New(); // creates undefined date
date3 := IfThen(date3.IsUndefined, TDateTime.Today, date3);
Methods:
class function TDateTimeHelper.Today: TDateTime;
class function TDateTimeHelper.New(aYear: integer = 0; aMonth: integer = 0; aDay: integer = 0): TDateTime;
function TDateTimeHelper.At(aHour: integer; aMinute: integer; aSecond: integer = 0): TDateTime;
function TDateTimeHelper.IsUndefined(): boolean;
Also provide meaningful error messages in exceptions