Display dates in a different calendar according to Regional Settings
Author: ncolmart@medinfo.fr (ncolmart)
Hi All
We are installing our application in a country where dates need to be displayed in another calendar than the standard Gregorian calendar. The application is running on Windows.
In Windows, the calendar used is defined in the Regional Settings : Control Panel / Regional and Language options
In the 'Regional Options' Tab, the format selected is 'Thai'.
With this option, the calendar used is different : the year 2011 is mapped to year 2554.
There is a difference of 543 years.
In Windows the date displayed in the bottom right corner is automatically displayed in this format.
But the system date is still in Gregorian Calendar format.
(to confirm, just open a DOS window with cmd.exe and enter 'date')
In Uniface the $date function returns the date in Gregorian format.
There is unfortunately no possibility with Uniface to display the dates in another calendar.
The main problem with this calendar, is that bissextile years are different, so the standard date controls are not valid.
Example : 29/02/2008 is valid. But corresponding 29/02/2551 is not valid !
Our need would be to store the dates in Gregorian format in the database but to display them in the local Calendar.
(preferably with any type of calendar)
Does someone already had the same need ?
Thanks for your help




