Bug 402962

Summary: Fix handling localized month/day names for input formats
Product: [Applications] KEXI Reporter: Jarosław Staniek <staniek>
Component: TablesAssignee: Kexi Bugs <kexi-bugs>
Status: REPORTED ---    
Severity: normal CC: adam, inksi
Priority: NOR    
Version: 3.1.0   
Target Milestone: 3.2.1   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:
Attachments: Test db

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