Closed
Bug 411516
Opened 18 years ago
Closed 17 years ago
Format dates and times according to the user's preferences
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.6
People
(Reporter: mark, Assigned: mark)
Details
(Keywords: fixed1.8.1.12)
Attachments
(3 files)
9.12 KB,
application/zip
|
Details | |
48.54 KB,
patch
|
stuart.morgan+bugzilla
:
review+
|
Details | Diff | Splinter Review |
27.29 KB,
patch
|
Details | Diff | Splinter Review |
Bug 411338 comment 1, re the date displayed in Bookmark Info windows:
>I also hate the default format string used for the last-visited date in the
>nib, but fixing it the right way will probably be 10.4-only and only suitable
>for the trunk.
Bug 411338 comment 2:
>As for fixing the format string, if what you want is the 10.4 non-crappy
>behavior you could take the CFDateFormatter-based formatter I made for cookies
>and make it shared in the meantime (depending on how much you care).
We can wrap CFDateFormatter on the 1.8 branch and use it other places we display dates and times, such as the Page Info window. On the trunk, we can just use the improved (10.4-and-up) NSDateFormatter directly.
Assignee | ||
Comment 1•18 years ago
|
||
BookmarkInfoPanel.nib had a formatter hooked up in the nib. The only difference in this nib is that the formatter's been disconnected.
Assignee: nobody → mark
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•18 years ago
|
||
For the 1.8 branch, we'll create an NSFormatter subclass that wraps CFDateFormatter to behave like the 10.4-and-up NSDateFormatter. The new class makes this patch slightly more interesting than the trunk patch.
Attachment #296212 -
Flags: review?(stuart.morgan)
Assignee | ||
Comment 3•18 years ago
|
||
On the trunk, we can just use NSDateFormatter directly. Other than not having the new wrapper class, this patch is almost identical to the 1.8 branch patch. The only major difference is that each time we create an NSDateFormatter, we need to call:
[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
Comment 4•17 years ago
|
||
Comment on attachment 296212 [details] [diff] [review]
Use CFDateFormatter (1.8 branch)
>+ * The Original Code is a Cocoa keyboard-equivalent-processing fake view.
Not so much ;)
>- lastVisitString =
>- [lastVisit descriptionWithCalendarFormat:[[mLastVisitField formatter] dateFormat]
>- timeZone:nil
>- locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];
>+ CmDateFormatter* dateFormatter = [[CmDateFormatter alloc] init];
>+ [dateFormatter setDateStyle:NSDateFormatterLongStyle];
>+ [dateFormatter setTimeStyle:NSDateFormatterLongStyle];
>+ lastVisitString = [dateFormatter stringFromDate:lastVisit];
>+ [dateFormatter release];
Here, and in the other similar cases, should we maybe have the formatter as a member, rather than constantly recreating it?
Attachment #296212 -
Flags: review?(stuart.morgan) → review+
Assignee | ||
Comment 5•17 years ago
|
||
Unrotted and checked in on the trunk and MOZILLA_1_8_BRANCH for 1.6b3.
I started looking at making the formatters be members by looking at the Privacy preference pane, and decided not to go for it because everything else we do there is scoped to live only as long as the sheet that's using it is live.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: fixed1.8.1.12
Resolution: --- → FIXED
Target Milestone: --- → Camino1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•