Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

Ext.Types

A library for Delphi that provides more convient alternatives to built in types.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

A library for Delphi that provides more convenient alternatives to built in types.

Ext.Types.Date

[!IMPORTANT]
Moved to Chrono,

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.

Code sample for Date unit

Iterates thorough days, from first day of month's first week, to last day of month's last week

  • TDate.Today - current date
  • TDate.Today.Month - month of the day
  • TDate.Today.MonthOfYear.First - first day of month
  • TDate.Today.MonthOfYear.First.StartOfWeek - first day of the month's first week
  • TDate.Today.MonthOfYear.First.StartOfWeek(Monday) - first day of the month's first week, when week starts from Monday
pascal
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;

Ext.Types.List

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.

Ext.Types.SmartPtr

Smart pointers