Chatzilla should use locale date/time formats

RESOLVED FIXED in mozilla1.7beta

Status

Other Applications
ChatZilla
--
minor
RESOLVED FIXED
14 years ago
6 years ago

People

(Reporter: James Ross, Assigned: James Ross)

Tracking

({intl, polish, relnote})

Trunk
mozilla1.7beta
intl, polish, relnote

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: cz-patch)

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
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.

Updated

14 years ago
Blocks: 231757
No longer depends on: 231757
(Assignee)

Comment 1

14 years ago
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.
(Assignee)

Comment 2

14 years ago
Created attachment 143247 [details] [diff] [review]
Uses nsIScriptableDateFormat to replace Date's toString

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.
(Assignee)

Updated

14 years ago
Whiteboard: cz-patch
(Assignee)

Updated

14 years ago
Attachment #143247 - Flags: review?(samuel)

Updated

14 years ago
Attachment #143247 - Flags: review?(samuel) → review+
(Assignee)

Comment 3

14 years ago
Comment on attachment 143247 [details] [diff] [review]
Uses nsIScriptableDateFormat to replace Date's toString

Checked in.
(Assignee)

Comment 4

14 years ago
I believe the patch just checked in covers this bug, marking FIXED. If this is
not correct, please reopen stating why.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
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.