Bug 119613 - FORMATTING Incorrect number and date format for South Africa (en_ZA)
Summary: FORMATTING Incorrect number and date format for South Africa (en_ZA)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-30 19:47 UTC by Gert van den Berg
Modified: 2024-02-21 22:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gert van den Berg 2018-08-30 19:47:50 UTC
Description:

(I'm assuming other South African languages are also affected)

LibreOffice Calc incorrectly uses decimal dots and commas as thousands separators when cells are formatted as currency or numbers.

South Africa officially uses decimal commas (dots are in common, incorrect use though and many applications require it) and spaces as the thousands grouping symbol. (Decimal points can be lived with, however commas for grouping creates confusion)

A blog post with several sources: https://sadev.co.za/content/how-correctly-format-currency-south-africa
A government style guide: https://www.gcis.gov.za/sites/default/files/editorial_styleguide_2011.pdf

The date format also defaults to YY/MM/DD, instead of the correct ISO-8601 format. See the description from this standard: https://store.sabs.co.za/catalog/product/view/id/216987/s/sans-8601-2009-ed-2-00/

Steps to Reproduce:
1. For numbers, enter 123456.12 (use numpad for decimal)
2. Click format as number on toolbar. Click format as Currency to view in currency as well.
3. Enter a date "Mar 2018".

Actual Results:
123,456.12
R 123,456.12
18/03/01

Expected Results:
123 456,12
R 123 456,12
2018-03-01


Reproducible: Always


User Profile Reset: No



Additional Info:
Computer running Windows 10 1803, set to English (South Africa)
Comment 1 Eike Rathke 2018-09-03 07:00:04 UTC
Thanks for the pointers and references. Comma as decimal separator and space as group separator seem to be a clear case. But, for the ISO 8601 date being used I find no normative references. Also the ICU Locale Explorer https://ssl.icu-project.org/icu-bin/locexp?d_=en&_=en_ZA lists the y/MM/dd date format.
Comment 2 Gert van den Berg 2018-09-03 07:56:52 UTC
SABS is the national standards body and have adopted ISO 8601 as SANS 8601. I'm not completely sure if it is meant for use everywhere though.

A version of the current one with 4-digit years as the default format would also be acceptable. I have not seen a 2-digit year used anywhere since Y2k. (dd-mm-yyyy is also in common use). (mm/dd/yyyy is completely unacceptable as a result.) The current default two digit years make it very hard to tell whether the day or year is at the start / end.

(I'm ok with the ICU format for dates - It matches the Windows defaults)

(Another note: I haven't seen the long date format ever be yyyy mmmmmm d, which Wikipedia lists)

(Adopting the entered format if it is available and still formatted as "General" might also make sense, but that is a separate feature request)

(I was considering Localisation as the component, but the description seemed to imply that it applies to translations)

Purchasing SABS's SANS M33a seems to be the best method for figuring it out (if it contains date formats...). This has a nice summary of non-date, non-currency things: http://www.sun.ac.za/english/faculty/eng/mechanical-mechatronic/Documents/Undergraduate/Current%20UG/MM%20Procedures%20for%20Final%20Year%20Projects/siguide.pdf (And some history on SANS M33a)

(Changing the decimal dot to commas WILL result in several more bugs being logged... The comma is official, but due to wrong Windows defaults for several decades systems were build around decimal dots, and commas tend to break third party applications (and many people assume that commas are wrong), especially if the CSV export depend on the regional settings, as in Excel) (Any one of those two as acceptable to me as long as the digit grouping symbol is set to as space and not the other one)

(Using the underlying OS's locale settings might be ideal and end up with the least bugs - if someone changed their defaults in the OS to use dots instead of commas, Calc should normally respect that)
Comment 3 Eike Rathke 2018-09-03 08:11:53 UTC
Adopting a standard doesn't necessarily mean it's actually used in the wild. Many countries "adopted" ISO 8601 but the actual date format used is still locale dependent.
Comment 4 Eike Rathke 2018-09-03 08:14:27 UTC
Noel found this https://en.wikipedia.org/wiki/Date_and_time_notation_in_South_Africa
Comment 5 Commit Notification 2018-09-03 11:39:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c10c448b299faf43d9df28bdb9dc4fbb00540aa

tdf#119613 [*-ZA] decimal separator is comma, group separator is space

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2018-09-03 11:39:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=464154aa26ae77883dd59fcbaab9e084aa035c9d

Related: tdf#119613 inherit af_ZA separators from identical en_ZA

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Gert van den Berg 2018-09-07 19:12:24 UTC
The number formats are correct on the daily 6.2 alpha builds.

The date format still has 2 digit years.
Comment 8 Commit Notification 2018-10-01 19:36:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fbc6415b85a855d3658be758efe4684cfd49faa3

Resolves: tdf#119613 [*-ZA] default to ISO 8601 date format

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-10-03 10:09:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e85966450b770e1169f113183ce1a9a9f4dcc507

Related: tdf#119613 tdf#118127 suppress duplicated builtins, rework All cat

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.