Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » EditField and DateFormat problems
Re: EditField topic created, chapters 17 and 18 of GUI tutorial added [message #4487 is a reply to message #4485] Fri, 11 August 2006 23:29 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
rbmatt wrote on Fri, 11 August 2006 15:43

Actually, it looks like those settings are only there for like 6 "major" languages.
An easier way:
SetDateScan("dmy");



Actually, there are two.

SetDateScan makes for ordering of "day" "month" "year" while parsing text to date (note that parsing is quite benevolent - even month names are tested, year can be YY or YYYY, separators is anything non al-num). There is also SetDateFilter that setups a filter function of date characters.

Opposite conversion is expressed by SetDateFormat - takes a Date, results text. It simply calls Format on the formatting string and date.year, date.month, date.day, DayOfWeek(date) as parameters. Formatting is flexible enough to convert these to any date needed.

When you do SetLanguage, all that really happens is this:

	SetDateFormat(t_("date-format\a%2:02d/%3:02d/%1:4d"));
	SetDateScan(t_("date-scan\amdy"));
	SetDateFilter(t_("date-filter\aA/\a .-"));


Means those date formatting settings are assigned a "translation" of en-us formatting settings... (the moral of story is that if you want different settings, setup them after calling the SetLanguage).

Mirek
 
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Read Message
Previous Topic: incorrect date format for hungarian language
Next Topic: TheIDE fie choser dialog can't recongize Chinese
Goto Forum:
  


Current Time: Sun Apr 28 17:34:43 CEST 2024

Total time taken to generate the page: 0.03657 seconds