Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9372 closed enhancement (fixed)

Enhancement: Add a "smart date" formatter

Reported by: Nathan Toone Owned by: Nathan Toone
Priority: high Milestone: 1.4
Component: Dojox Version: 1.3.0
Keywords: Cc: 7twenty
Blocked By: Blocking:

Description (last modified by Nathan Toone)

GMail (and others) do a really nice thing with their date and time formatting to keep it short:

If the date portion is the current day, only the time portion is displayed (i.e. "9:32 am").

If the date portion is within the past week, it displays the day of week and the time (i.e. "Mon 9:32 am")

If the year portion is the same as the current year, it displays the month and day only (i.e. "Nov 1")

Otherwise, it displays the date in "medium" format length (i.e. "Jun 1, 2010")

It might be nice to have a formatting function in dojox that would do the same sort of thing...

Change History (5)

comment:1 Changed 10 years ago by Nathan Toone

Description: modified (diff)

comment:2 Changed 10 years ago by Nathan Toone

Implemented in revision [17706]

comment:3 Changed 10 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

comment:5 Changed 10 years ago by Nathan Toone

Milestone: future1.4
Note: See TracTickets for help on using tickets.