Closed
Bug 1512808
Opened 2 years ago
Closed 2 years ago
filter rule date format broken
Categories
(MailNews Core :: Filters, defect)
MailNews Core
Filters
Tracking
(thunderbird_esr6064+ fixed, thunderbird64 wontfix, thunderbird65 fixed)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: aceman, Assigned: aceman)
References
Details
Attachments
(1 file, 1 obsolete file)
1.02 KB,
patch
|
aceman
:
review+
jorgk-bmo
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
It seems the recent changes to date formatting according to locale has broken our display of dates in filter rules. When editing a filter, select Date as a term in filter criteria. Notice the sample date showing in the value field. It shows 8.2018.12 (8th Dec 2018) for me, which is complete nonsense for either en_US or sk_SK locale that come into play in my TB environment.
Using Services.intl.DateTimeFormat() in initLocaleShortDateFormat() may return strings with spaces, which we didn't expect. E.g. in may case it was "8. 12. 2018".
Attachment #9030089 -
Flags: review?(jorgk)
Comment 2•2 years ago
|
||
Comment on attachment 9030089 [details] [diff] [review] 1512808.patch Review of attachment 9030089 [details] [diff] [review]: ----------------------------------------------------------------- Can we make this two patches, please, the clean-up should go separate. I can't see the forest for the trees. ::: mailnews/base/content/dateFormat.js @@ +24,5 @@ > try { > const dateFormatter = new Services.intl.DateTimeFormat(undefined, > { dateStyle: "short" }); > var aDate = new Date(1999, 11, 1); > + var dateString = dateFormatter.format(aDate).replace(/ /g,""); This is the net change, the rest is boy-scout clean-up which obscures it. @@ +34,2 @@ > { > + arrayOfStrings = dateString.split( possibleSeparators[i]); Another space after the (.
Attachment #9030089 -
Flags: review?(jorgk) → review+
Yes, thanks.
Attachment #9030089 -
Attachment is obsolete: true
Attachment #9030111 -
Flags: review+
Affects multiple locales now containing spaces, e.g. "sk", "cs", "hr", "hu". Others like "en", "fr", "es", "ru" are OK.
Updated•2 years ago
|
Keywords: checkin-needed
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/c3afcea69ad2 fix date format detection in initLocaleShortDateFormat(). r=jorgk DONTBUILD
Updated•2 years ago
|
Target Milestone: --- → Thunderbird 65.0
Comment 6•2 years ago
|
||
Comment on attachment 9030111 [details] [diff] [review] 1512808.patch v2 I assume that's a problem in TB 60 as well.
Attachment #9030111 -
Flags: approval-comm-esr60+
Comment 7•2 years ago
|
||
TB 60.4 ESR: https://hg.mozilla.org/releases/comm-esr60/rev/321076459c7e7d81d4fdcff7284ebcc0fc53e272
status-thunderbird64:
--- → wontfix
status-thunderbird65:
--- → fixed
status-thunderbird_esr60:
--- → fixed
tracking-thunderbird_esr60:
--- → 64+
No, it does not happen on TB60 on the same machine. But it shouldn't hurt if you land it there too.
Ok, the 2 versions of TB run under different users, there may be different settings of the desktop environment, if that is taken into account in any way.
![]() |
Assignee | |
Comment 10•2 years ago
|
||
Right, it does happen in TB60 under the same user as trunk.
Comment 11•2 years ago
|
||
Thanks for confirming, I've already landed it on the ESR release ;-)
You need to log in
before you can comment on or make changes to this bug.
Description
•