Today, Tomorrow and Yesterday in Delphi Dates

As discussed previously, our String to Time methods do allow for ‘Now’, ‘Midnight’ and ‘Noon’ to be entered (based on current Language Settings) and converted to associated times. These also now reside in a TTimeStrings record to allow for easy expansion.

We are hard at work at our “String to Date” methods and have similarly allowed ‘Today’, ‘Yesterday’ and ‘Tomorrow’ to be entered (based on current Language Settings) and converted to associated dates. These reside in a TDateStrings record along with the custom strings for BC/BCE and CE/AD Eras.

However when using a Date Formatter Class or a Formatter Component, the various Date to String methods will use ‘Today’, ‘Yesterday’ and ‘Tomorrow’ if the UseCommonNames Property is True. Also Date Edits that are attached to a Formatter Component that has UseCommonNames set to true, will display these strings if appropriate. Plus the Class and Component both allow these strings available as properties thus they can be customised for a particular instance.

Are there other strings you think we should add support for?

About esbglenn

Software Developer working at our Family owned business, ESB Consultancy, which is located in Kalgoorlie-Boulder, in the Eastern Goldfields of Western Australia.
This entry was posted in Beta Development and tagged , , , , . Bookmark the permalink.

Leave a Reply