Auto format date value problem #269

Closed
opened 2015-07-03 22:21:58 +00:00 by calebeaires · 4 comments
calebeaires commented 2015-07-03 22:21:58 +00:00 (Migrated from github.com)

On XLSX cell date format, when we use date from Brazil. It change the "correctly place" from numbers

On Brazil: 01/03/2015 = Day/Month/Year
On XLSX.read(): 03/01/2015 = Month/Day/Year

Is there some config option, so we can customize it. I do not want to change the CORE javascript. I notice this change must be made on table_fmt[14]

On XLSX cell date format, when we use date from Brazil. It change the "correctly place" from numbers On Brazil: 01/03/2015 = Day/Month/Year On XLSX.read(): 03/01/2015 = Month/Day/Year Is there some config option, so we can customize it. I do not want to change the CORE javascript. I notice this change must be made on `table_fmt[14]`
MrHubble commented 2016-01-05 00:42:27 +00:00 (Migrated from github.com)

@calebeaires did you find a solution to your problem. I also would like to avoid changing table_fmt[14] but it seems to be the cleanest solution I can find right now.

@calebeaires did you find a solution to your problem. I also would like to avoid changing `table_fmt[14]` but it seems to be the cleanest solution I can find right now.
reviewher commented 2017-01-03 17:49:43 +00:00 (Migrated from github.com)

@calebeaires @MrHubble technically format code 14 (mm/dd/yy) is supposed to apply locale-specific formatting. This part is not documented, so to fix this we need to blast through a bunch of locales, figure out the formats used in each locale, then devise a way to specify locale to the formatting library. @MrHubble what is your current locale and what format does Excel use in your computer?

@calebeaires @MrHubble technically format code 14 (`mm/dd/yy`) is supposed to apply locale-specific formatting. This part is not documented, so to fix this we need to blast through a bunch of locales, figure out the formats used in each locale, then devise a way to specify locale to the formatting library. @MrHubble what is your current locale and what format does Excel use in your computer?
MrHubble commented 2017-01-04 03:22:40 +00:00 (Migrated from github.com)

@reviewher

Locale:

LANG="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_CTYPE="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_ALL=

Excel uses Australia (English), defaults to dd/mm/yy

@reviewher Locale: ```` LANG="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_CTYPE="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_MONETARY="en_AU.UTF-8" LC_NUMERIC="en_AU.UTF-8" LC_TIME="en_AU.UTF-8" LC_ALL= ```` Excel uses Australia (English), defaults to dd/mm/yy
SheetJSDev commented 2017-04-30 16:08:19 +00:00 (Migrated from github.com)

We're adding an override option dateNF to the parsers so you can call something like:

var wb = XLSX.readFile(filename, {dateNF:"dd/mm/yyyy"});

to override the local display but preserve the file

We're adding an override option `dateNF` to the parsers so you can call something like: ```js var wb = XLSX.readFile(filename, {dateNF:"dd/mm/yyyy"}); ``` to override the local display but preserve the file
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#269
No description provided.