Ticket #3489 (reopened enhancement)

SVN Diffs for #3489

 

Opened 5 years ago

Last modified 7 months ago

Additional (combinatoric) date/time options needed by iCal, ...

Reported by: goldsmit(at)apple.com Assigned to: claireho
Priority: minor Milestone: 3.8
Component: formatting Version: 2.8
Keywords: formatting Cc: deborah,srl
Load: Google:75 Apple:50 Xref:
Java Version: Operating System: mac
Project (C/J): ICU4C,ICU4J and ICU4JNI Weeks: 6
Review: pedberg

Description

I sent this by e-mail previously but forgot to submit a Jitterbug. iCal uses the following formats which they cannot generate from the existing ICU locale data: - (NSString*)localizedLongDateWithoutDay; // décembre 2001 - (NSString*)localizedAbbrevDateWithoutDay; // dec 2001 - (NSString*)localizedLongDateWithoutYear; // Vendredi 14 décembre, 02 de janeiro - (NSString*)localizedAbbrevDateWithoutYear; // Ven 14 dec, 02 de jan - (NSString*)localizedShortDateWithoutYear; // 14/12, 14.12 - (NSString*)localizedLongDayMonthWithoutDayOfWeek; // 14 décembre - (NSString*)localizedAbbrevDayMonthWithoutDayOfWeek; // 14 dec - (NSString*)localizedLongDayOfWeekWithDayOfMonthFormat; // Jeudi 15 - (NSString*)localizedAbbrevDayOfWeekWithDayOfMonthFormat; // Jeu 15 - (NSString*)localizedOneCharacterAbbrevDayOfWeek; // J,M - (NSString*)localizedHourMinutesWithoutAMPM; // 20:30 or 08:30 or 8:30 (or 04:10 or 4:10) - (NSString*)localizedHourMinutes; // 20:30 or 08:30 pm or 8:30 pm (or 4:10 or 04:10 or 4:10 am or 04:10 am) - (NSString*)localizedHourWithoutAMPM; // 08 or 8 or 20 (or 4 or 04) - (NSString*)localizedHour; // 20 or 08 pm or 8 pm (or 4 or 04 or 4 am or 04 am)

The menu bar clock has a similar issue of needing a localized date/time format which does not fit one of the existing ones.

One approach is to add a zillion new format strings to each locale; another is to try to come up with a way to reliably extract this information. The menu bar clock's problem would be solved if it could pass format strings separately for the date and time, and use the locale data for the ordering of the date and time parts.

For example, if you could say: I want the date to be the abbreviated day of the week, the time to have seconds, and the order of the two to be whatever the locale specifies.

To summarize, right now there are four prepackaged date formats and four prepackaged time formats. I think the best way to address this issue would be to allow you to specify which pieces you want to appear in the date format and which pieces you want in the time format (e.g., don't want year, do want seconds, don't want time zone, etc.).

Attachments

Change History

12/31/69 17:37:11 changed by notes2

ICU4C and ICU4J SUMMARY: RFE: Additional (combinatoric) date/time options needed by iCal, menu clock

12/31/69 17:37:12 changed by auditor

  • 01/21/04 20:16:31 schererm moved from incoming to formatting
  • 02/03/04 14:39:59 alan changed notes2
  • 02/03/04 19:47:26 grhoten changed notes2
  • 02/05/04 15:21:18 alan changed notes2
  • 02/05/04 15:29:53 alan changed notes2
  • 07/12/04 17:17:33 srl changed notes2
  • 07/12/04 18:12:22 grhoten changed notes2
  • 07/19/04 19:03:20 srl changed notes2

(follow-up: ↓ 4 ) 01/24/07 13:29:40 changed by anonymous

This looks like flexible date-time formatting.

(in reply to: ↑ 3 ) 01/24/07 13:32:51 changed by deborah

  • xref changed.
  • java changed.
  • revw changed.

Replying to anonymous:

This looks like flexible date-time formatting.

It is. This bug tracks porting the implementation from ICU4J to ICU4C.

03/23/07 11:49:32 changed by andy

  • load set to Google:75 Apple:50.

09/26/07 16:24:30 changed by mark

  • owner changed from mark to claireho.

Claire, I think this is now a duplicate of the work you did. Can you take a look?

09/27/07 15:44:36 changed by claireho

  • status changed from new to closed.
  • summary changed from RFE: Additional (combinatoric) date/time options needed by iCal, ... to Additional (combinatoric) date/time options needed by iCal, ....
  • resolution set to fixed.
  • revw set to deborah.
  • milestone changed from UNSCH to 3.8.

The new C APIs are in 3.8 release now. Please check the code in

  1. i18n/unicode/udatpg.h
  2. i18n/udatpg.cpp
  3. test/test/cintltst/udatpg_test.c

09/27/07 16:43:23 changed by claireho

  • status changed from closed to reopened.
  • resolution deleted.

04/14/08 16:52:43 changed by claireho

Hi Debora,

Please review the C APIs, thanks!

04/15/08 21:40:47 changed by pedberg

  • revw changed from deborah to pedberg.

Add/Change #3489 (Additional (combinatoric) date/time options needed by iCal, ...)




Anti spam check: