Closed Bug 236639 Opened 21 years ago Closed 21 years ago

Chatzilla should use locale date/time formats

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.7beta

People

(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)

References

Details

(Keywords: intl, polish, relnote, Whiteboard: cz-patch)

Attachments

(1 file)

Currently ChatZilla relies of Date's toString() to format date/time strings. This produces an unfriendly, fixed format. Using toLocaleString() should produce a OS/user set locale-dependant version of it. It has been suggested to use the nsIScriptableDateFormat, but I feel this is a) overkill, and b) if toLocaleString() doesn't work right, it's a bug in the Date object.
Blocks: dateandtime
No longer depends on: dateandtime
I came up with an evil way to do this earlier; replace Date.prototype.toString with our own little routine that called nsIScriptableDateFormat.FormatDateTime. It worked suprisingly well, as it only seems to affect the ChatZilla window.
This replaces Date.prototype.toString to use nsIScriptableDateFormat and the OS' long date format. It also changes so the statusbar and log timestamp use the OS' short date format. The toString replacement only affects the ChatZilla window, and makes dates like the topic set date show up in the current locale's format.
Whiteboard: cz-patch
Attachment #143247 - Flags: review?(samuel)
Attachment #143247 - Flags: review?(samuel) → review+
Comment on attachment 143247 [details] [diff] [review] Uses nsIScriptableDateFormat to replace Date's toString Checked in.
I believe the patch just checked in covers this bug, marking FIXED. If this is not correct, please reopen stating why.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: intl, polish, relnote
Target Milestone: --- → mozilla1.7beta
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: