Closed
Bug 260169
Opened 20 years ago
Closed 20 years ago
generalize formatDateTime and formatInterval relative to given date, not just today
Categories
(Calendar :: Sunbird Only, defect)
Calendar
Sunbird Only
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gekacheka, Assigned: gekacheka)
References
Details
Attachments
(3 files)
7.64 KB,
patch
|
Details | Diff | Splinter Review | |
9.09 KB,
patch
|
Details | Diff | Splinter Review | |
861 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: cvs-cal
dateUtils formatDateTime and formatInterval have the option to format only time
or timerange without date if formatted date is today.
These methods can be generalized so they will format only time or timerange if
formatted date is same as a relativeToDate. This will make it easier to show
only time or time range when formatting a event in a grid box for tooltips or
printing, where the date is clear from the box.
Reproducible: Always
Steps to Reproduce:
modify formatInterval: add optional parameter relativeToDate.
If interval is all day 1 day on relativeToDate, produce localized "All Day".
On other intervals within a day, relativeToDate is passed to formatDateTime.
Simplify code to call isOnSameDate.
add isOnSameDate(date1, date2)
modify formatDateTime: change optional param omitIfToday to relativeToDate,
where relativeToDate defaults to today if true and not a date.
change optional param timeString to allDayOrTimeString,
where allDayOrTimeString defaults to localized "All Day" if true and not a
string.
Simplify code to call isOnSameDate.
Assignee: mostafah → gekacheka
Status: NEW → ASSIGNED
Copy localized property AllDay from calendar.properties to
dateFormat.properties so it will be available to the dateFormatter in its
string bundle. (en-US first)
(It can be removed from calendar.properties once the two places that use it are
converted to use these modified date format methods.)
Modify formatUnifinderEventDateTime to call formatDateTime with true for the
allDayOrTimeString. Remove lookup of localized "AllDay".
Comment 4•20 years ago
|
||
Please cc me on calendar bugs you assign to yourself.
Comment 5•20 years ago
|
||
All patches checked in. Thanks
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 6•18 years ago
|
||
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in
before you can comment on or make changes to this bug.
Description
•