Bug 402962 - Fix handling localized month/day names for input formats
Summary: Fix handling localized month/day names for input formats
Status: REPORTED
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 3.1.0
Platform: Other All
: NOR normal
Target Milestone: 3.2.1
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-07 09:19 UTC by Jarosław Staniek
Modified: 2019-01-07 09:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test db (36.00 KB, application/x-kexiproject-sqlite2)
2019-01-07 09:33 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2019-01-07 09:19:49 UTC
SUMMARY

Localized month/day names for input formats, both abbreviated and long, are not supported by the input masks so should be blocked at startup.

STEPS TO REPRODUCE "input handling for localized month/day names for input formats"
1. Run KEXI using "LC_TIME=C kexi-3.1"
2. Open create/any document, go to table data view for date or date/time format.
3. Repeat the step 2 and observations for a form with such date types.

OBSERVED RESULT
Date/time values are like "12 Dec 1992". On editing they have incompatible input mask, what makes data entry impossible for this format.

EXPECTED RESULT
Date/time values can be still displayed like "12 Dec 1992" but on editing they have to allow data entry. 
Proposed solution is to replace input format sections as follows (see docs of QDate::fromString(const QString &string, const QString &format)):

ddd (The abbreviated localized day name (e.g. 'Mon' to 'Sun')) -> d (day number)
dddd (The long localized day name (e.g. 'Monday' to 'Sunday')) -> d (day number)
MMM (The abbreviated localized month name (e.g. 'Jan' to 'Dec')) -> M (the month as a number)
MMMM (The long localized month name (e.g. 'January' to 'December')) -> M (the month as a number)

SOFTWARE/OS VERSIONS
Any

ADDITIONAL INFORMATION
Output formats can stay as they are.
Order of sections would not be altered.
Comment 1 Jarosław Staniek 2019-01-07 09:33:35 UTC
Created attachment 117317 [details]
Test db