cancel
Showing results for 
Search instead for 
Did you mean: 

Show date dependant of portal locale

Former Member
0 Kudos

Hi,

I want to display a date dependant of the locale of the user/portal/system settings. I assume the system settings are normally used. So if the user has an english system...use dd-mm-yyyy and if he has a dutch setting use mm-dd-yyyy for example.

I searched on the forum and found a usefull post but there was a link which was broken...see post :

I know that i can use the SimpleDateFormatter for that but i still have to enter a pattern....is it also possible to only supply a locale so it figures out the pattern itself?

Much thanks,

Hugo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hugo,

Use

DateFormat.getDateInstance(int style, Locale aLocale)

where you get Locale from

WDResourceHandler.getCurrentSessionLocale()

Or use IWDResourceHandler.formatDate().

Regards

Markus

Former Member
0 Kudos

Hi Markus,

Thanks, was looking for that!

regards,

Hugo

Answers (0)