Tracking the Date

From RAD Studio
Jump to: navigation, search

Go Up to Filling in the Cells


For the calendar control to be useful, users and applications must have a mechanism for setting the day, month, and year. Delphi stores dates and times in variables of type TDateTime. TDateTime is an encoded numeric representation of the date and time, which is useful for programmatic manipulation, but not convenient for human use.

You can therefore store the date in encoded form, providing runtime access to that value, but also provide Day, Month, and Year properties that users of the calendar component can set at design time.

Tracking the date in the calendar consists of the processes: