2

Regarding to ICU - International Components for Unicode definition:

ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.

one of important part is formatting:

Formatting: Format numbers, dates, times and currency amounts according the conventions of a chosen locale. This includes translating month and day names into the selected language, choosing appropriate abbreviations, ordering fields correctly, etc. This data also comes from the Common Locale Data Repository.

which implemented in vary languages; I would like to know if there is any implementation or work for MySQL to add this feature for Unicode date formatting?

1

I think the answer is... Use MySQL to store dates/datetimes/timestamps in the limited formats that it provides, then use app code -- possibly some library in your app language -- to get at fancier formatting.

As a general rule, a database is responsible for storing; the application is responsible for formatting.

See also https://dev.mysql.com/doc/refman/5.7/en/locale-support.html

  • Good Answer. For example, the java.time classes use the cultural norms rules provided by the Unicode CLDR for automatic localization when generating strings representing date-time values. This is default behavior in Java 9 and later (at least on Oracle JDK & OpenJDK), optional in earlier Java. – Basil Bourque Jul 13 '18 at 21:27
  • @BasilBourque - Java may be the best approach. Meanwhile, I added a link to MySQL's meager Locale support. (It goes back at least to version 5.5.) – Rick James Jul 13 '18 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.