Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to get date format from the client side?
How to get date format from the client side? [message #1770538] Mon, 14 August 2017 03:10 Go to next message
Eclipse UserFriend
Hi,

When users import their files(eg.EXCEL) containing DATE value into the RAP app, how to get each client user's date format string? Such as "MM/dd/yyyy" or "dd/MM/yyyy" and so on!

I can get client IP/Time zhone, but failed to get the date format string!

Thank you for help!


BEST,
David

[Updated on: Mon, 14 August 2017 03:20] by Moderator

Re: How to get date format from the client side? [message #1770544 is a reply to message #1770538] Mon, 14 August 2017 05:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
I don't think that this is possible in JS. Try to get the default (browser) locale with RWT.getLocale() and construct your Date formatter on the server.
HTH,
Ivan
Re: How to get date format from the client side? [message #1770605 is a reply to message #1770544] Mon, 14 August 2017 18:56 Go to previous message
Eclipse UserFriend
If it's an Excel file (XLS or XLSX, not CVS, etc) then the formatting for each date cell is stored in the file. The actual date value is stored in an XLS file as a floating point representing the number of days since 1900 (or 1904 if it's an old Excel for Mac).

A files date format also isn't necessarily going to match the locale value their browser is sending in the Accept-Language header.
A locale also only specifies a default date format. Doesn't mean the user is actually using that format.
Previous Topic:How to get date format from the client side?
Next Topic:Shell widget: minimize button in titlebar
Goto Forum:
  


Current Time: Mon Jul 14 06:18:58 EDT 2025

Powered by FUDForum. Page generated in 0.16337 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top