#13679: Implement a Relative DateTime Formatter
-------------------------------+----------------------------
Reporter: akshay | Owner: pulkomandy
Type: task | Status: new
Priority: normal | Milestone: Unscheduled
Component: Kits/Locale Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
-------------------------------+----------------------------
Comment (by akshay):
* After this gets committed I'll look at existing code requiring this and
incorporate it there.
*
https://github.com/haiku/haiku/blob/master/src/kits/locale/DurationFormat.cpp#L56
https://github.com/haiku/haiku/blob/master/src/kits/locale/TimeUnitFormat.cpp#L70-L94
coding guidelines says - "The ':' always comes on its own line".
Conflicting indendation style all over causes confusion everytime.
* such NULL checks without using std::nothrow is there at quite a few
places in locale kit. I'll fix them as well.
* Ya, in case of time_t, setting of timezone is not required. Not sure why
BDurationFormat requires it.
I have a doubt regarding using BDateTime. It's not timezone aware so
the timezone(associated with a particular BDateTime) has to be separately
stored every time we create a BDateTime. Should we make the BDateTime
timezone aware by itself?
In case a BDateTime is used here(as an input to
RelativeDateTimeFormat::Format()), timezone associated with it would be
required to set the calendar to that, or we calculate the time_t using
that info, and use that with calendar set to default timezone(like it's
there currently?
--
Ticket URL: <https://dev.haiku-os.org/ticket/13679#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.