View Problem
Display a date in different locales
Display a language/locale friendly version of New Year's Day for 2009 for several languages/locales. E.g. for languages English, French, German, Italian, Dutch the output might be something like:
Thursday, January 1, 2009
jeudi 1 janvier 2009
giovedì 1 gennaio 2009
Donnerstag, 1. Januar 2009
donderdag 1 januari 2009
(Indicate in comments where possible if any language specific or operating system configuration needs to be in place.)
Submit a new solution for php or clojure
There are 9 other solutions in additional languages (cpp, csharp, fantom, fsharp ...)
Thursday, January 1, 2009
jeudi 1 janvier 2009
giovedì 1 gennaio 2009
Donnerstag, 1. Januar 2009
donderdag 1 januari 2009
(Indicate in comments where possible if any language specific or operating system configuration needs to be in place.)
php
/* Be aware of that you need to have the locales installed */
setlocale(LC_TIME, "en_US");
echo strftime("%A, %B %e, %Y%n"); // %n = \n in strftime()
setlocale(LC_TIME, "fr_FR"); // French
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "de_DE"); // German
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "it_IT"); // Italian
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "nl_NL", "nld_nld"); // Dutch; Unix and Windows
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "en_US");
echo strftime("%A, %B %e, %Y%n"); // %n = \n in strftime()
setlocale(LC_TIME, "fr_FR"); // French
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "de_DE"); // German
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "it_IT"); // Italian
echo strftime("%A, %B %e, %Y%n");
setlocale(LC_TIME, "nl_NL", "nld_nld"); // Dutch; Unix and Windows
echo strftime("%A, %B %e, %Y%n");
Submit a new solution for php or clojure
There are 9 other solutions in additional languages (cpp, csharp, fantom, fsharp ...)




