Types related to Date & Time, including replacement to TDateTime, TTime and TDate system types. Also provides helpers and utilites related to date and time calculations.
Iterates thorough days, from first day of month's first week, to last day of month's last week
TDate.Today - current dateTDate.Today.Month- month of the dayTDate.Today.MonthOfYear.First- first day of monthTDate.Today.MonthOfYear.First.StartOfWeek- first day of the month's first weekTDate.Today.MonthOfYear.First.StartOfWeek(Monday)- first day of the month's first week, when week starts from Monday
for var D in TDate.Sequence(TDate.Today.MonthOfYear.First.StartOfWeek(Monday), TDate.Today.MonthOfYear.Last.EndOfWeek(Monday)) do
begin
Writeln(D.Format('YYYY-MM-DD') + string(D.Weekday));
end;very raw version, only for experiments
Generic List<T>, wrapping system TArray<T> type. Supports modern set of functions like Filter, Join, Map, Reduce etc.
Smart pointers