Skip to Content
0
Former Member
Jun 13, 2006 at 09:10 AM

Formatting a date according with user settings (user defaults)

78 Views

Hi All,

I need to format a date I receive via JS in YYYYMMDD format according with user defaults <b>without</b> server side action (I know, this is not a good issue, but they want it).

My solution is to write a JS function (there are a lot of it on WWW) which accepts two strings and formats the first according to the second, something like:

userFormattedDate = formatDate('20060613','DD.MM.YYYY');

paying attention to generate 'DD.MM.YYYY' string on server side, according to user settings.

But if this isn't a weblog, where is the question? :-D

The question is: is there a JS function (in DatePicker or dateNavigator BSP) provided by standard libraries which serves similar functionality?

Does exist a JS public standard library?

Thanks.

Dany 😊