Closed Bug 4763 Opened 21 years ago Closed 21 years ago

International date format for the message thread pane

Categories

(MailNews Core :: Internationalization, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: nhottanscp, Assigned: scottputterman)

References

Details

(Whiteboard: DEPEND - Intl)

International date/time format for the message thread pane for M5.
Assignee: nhotta → putterman
OS: Windows NT → All
Hardware: PC → All
Target Milestone: M5
Reassigning to putterman, please reassign if necessary.
Use nsIDateTimeFormat
(see a document at http://www.mozilla.org/projects/intl/date-time-format.html).
We agreed to use always application locale (i.e. single date format through one
app). Application locale can be available through
nsILocaleFactory::GetApplicationLocale.
Status: NEW → ASSIGNED
Chris,

I think we had talked about this before about having a Date Literal that the
tree widget could display correctly.
Target Milestone: M5 → M6
Moving to M6.
I'm trying to use this, but it looks like your nsILocaleFactory, which I'm
trying to create so I can call GetApplicationLocale, is always returning me an
nsILocale rather than an nsILocaleFactory.  Therefore I crash when I try to call
nsILocaleFactory::GetApplicationLocale.
Also, when I do:

	rv = nsComponentManager::CreateInstance(kDateTimeFormatCID, NULL,
		nsIDateTimeFormat::GetIID(), getter_AddRefs(mDateTimeFormat));
I always get back a null pointer so I can't use this.
You also might want to add
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOCALEFACTORY_IID)
 to nsILocaleFactory.h
The date/time interface does not have GetIID, please use the following for now.
static NS_DEFINE_IID(kIDateTimeFormatIID, NS_IDATETIMEFORMAT_IID);
Adding tague@netscape.com to cc, he owns nsILocaleFactory.
Regarding the problem of nsILocaleFactory::GetApplicationLocale, it is also used
for the message sorting. I am not sure why it causes the problem for date/time
in particular.
It may be related that there was a windows dll loading problem (#5564) but I
think that has been fixed.
It looks like I might have been using it wrong.  There's probably not a problem.
I was using CreateInstance instead of FindFactory.  I'll try that out tomorrow.
There may not be any problem with the nsIDateFormat either.  I'll update this
bug when I try these out.
OK, I'm able to get all of these objects now.  I'll update this bug if I have
any problems using the date/time formater.

Also, I think it would be useful to implement GetIID() for these classes.  I was
trying to use an nsCOMPtr with some of these and I couldn't because of this.
OK, everything seems to be working, at least for my application locale.  I'll
check this in when the tree opens.
I will implement GetIID() for M7. These classes are bit old (written in 1/99).
This isn't working on my linux build.  It can't find the factory and it can't
create a DateTimeFormat.  Is there a registering problem with this dll on Linux?
I can't check this code in until it works there.
My test program (LocaleSelfTest.cpp) is also failing for creating
nsILocaleFactory.
Tague, could you take a look at this?
Scott, does sorting have the same problem?
Sorting seems to work as well as it ever did.  I can probably check this code
in, but it will mean that the date column will stop showing up on linux until
this is fixed which would be a pretty high priority.  I also don't know if this
works on the Mac.
Getting rid of the #if 0 made it work on Linux.  Is there a reason why we
shouldn't check it in?  I can check it in but I'd like to know what I might be
breaking by doing that.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I checked in my fixes.  Right now there will be no date string in Linux until we
fix the registration problems.  But you can test this on Windows.
this should be fixed on linux and should be working on Mac once I get checkin
approval.
Whiteboard: DEPEND - Intl
QA Contact: 1308 → 4648
marina, please verify if this fix is working
Status: RESOLVED → VERIFIED
I verified it on the French NT 4.0, it is working ,the data is in the
\\babel\babel_docs\tests\Mail-News\tools\sort\data7.txt
Blocks: 7228
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.