History log of /haiku/headers/os/locale/DateFormat.h
Revision Date Author Comments
# 42745b94 03-Sep-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

BDateFormat: Properly map day values to ICU day-of-week.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# ec3dbaa1 30-Aug-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Use B_FULL_DATE_FORMAT as the default style value.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>


# bb3ad41a 30-Aug-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Implement functions to get localized long/short dayofweek name and short month name in BDateFormat.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 73de5837 10-May-2015 Jérôme Duval <jerome.duval@gmail.com>

Update icu x86_64 package with namespace renaming enabled.

"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.


# 5d5ec05b 27-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

B*Format: make immutable and remove locking

The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.


# 97d07c8a 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add API for parsing dates.


# 090a0d76 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add an API to get month names.


# 4a3a4742 06-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Reimplement BDateTimeFormat using ICU support

* Avoid hardcoding the format to "date, time"
* Allows using DateTimePatternGenerator to create custom formats from a
set of fields.


# e3857211 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move DateTimeFormat and NumberFormat out of BLocale

* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)


# 44f11d09 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat inherit from BFormat again

* Move relevant parts up into BFormat so other format classes can use
those
* Adjust BDurationFormat and BTimeUnitFormat for the changes
* Remove the "default" date format, it is better to keep only a default
locale and let applications create B*Formats from it as needed.
* Creating a B*Format without arguments to the constructor now
configures it for the default locale, which allows for easy use in
standard cases (formatting something with the current language and
format)
* Creating a B*Format is potentially an expansive operation, it is
advised to keep the instance around and reuse it whenever possible.
However it must be "refreshed" when the locale changes, for apps which
supports that, since it keeps a copy of the language and formatting
convention, rather than a pointer to the locale as it did before.


# 526d4839 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat mutable

* Add setters for the language and formatting conventions
* Add shortcut getter and setter for the date format
* Use those in the locale roster to make the BDateFormat actually use
the system preferred language and format.
* Applications can also use this to extract specific information from
the system format (eg. set date format to "LLLL" to extract month
names), or define specific formats more easily (eg. for parsing and
generating e-mail headers or HTTP cookies).


# f188c1de 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

BDateFormat: improve API

* Use a reference rather than a pointer for the output string, removing
the need for NULL checks (which were missing, anyway)
* Adjust callers to that change
* Add new Format variant taking a BDate argument


# 2a5e33a9 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 38ac8def 01-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes
out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
but uses copies, instead - this makes locking superfluous, as the clients'
BCountry objects can no longer be changed by the setting a new default
country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
(the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time
preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 73de58376ac8f983ae64a643e01ec5bf047208d2 10-May-2015 Jérôme Duval <jerome.duval@gmail.com>

Update icu x86_64 package with namespace renaming enabled.

"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.


# 5d5ec05b1df089eff03f04a7122ac7cf355c4f3e 27-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

B*Format: make immutable and remove locking

The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.


# 97d07c8af2522f681cf61c37b0cfc36ec4684d1a 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add API for parsing dates.


# 090a0d76869e3b5e7ba7024a44b1ebcf84e23bed 07-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Add an API to get month names.


# 4a3a4742241f0843867e76cbc49694b9e4146b2f 06-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Reimplement BDateTimeFormat using ICU support

* Avoid hardcoding the format to "date, time"
* Allows using DateTimePatternGenerator to create custom formats from a
set of fields.


# e3857211d305a595c2d0b58768f25623d5967675 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move DateTimeFormat and NumberFormat out of BLocale

* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)


# 44f11d0982feb6ed1cc66c4d6d0a26bffd8ce4d4 01-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat inherit from BFormat again

* Move relevant parts up into BFormat so other format classes can use
those
* Adjust BDurationFormat and BTimeUnitFormat for the changes
* Remove the "default" date format, it is better to keep only a default
locale and let applications create B*Formats from it as needed.
* Creating a B*Format without arguments to the constructor now
configures it for the default locale, which allows for easy use in
standard cases (formatting something with the current language and
format)
* Creating a B*Format is potentially an expansive operation, it is
advised to keep the instance around and reuse it whenever possible.
However it must be "refreshed" when the locale changes, for apps which
supports that, since it keeps a copy of the language and formatting
convention, rather than a pointer to the locale as it did before.


# 526d4839991d4dcbb0dc361e7a9f6721481a3ebe 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Make BDateFormat mutable

* Add setters for the language and formatting conventions
* Add shortcut getter and setter for the date format
* Use those in the locale roster to make the BDateFormat actually use
the system preferred language and format.
* Applications can also use this to extract specific information from
the system format (eg. set date format to "LLLL" to extract month
names), or define specific formats more easily (eg. for parsing and
generating e-mail headers or HTTP cookies).


# f188c1defa3ffef28c2a76b1b21fa7dc017f3e5b 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

BDateFormat: improve API

* Use a reference rather than a pointer for the output string, removing
the need for NULL checks (which were missing, anyway)
* Adjust callers to that change
* Add new Format variant taking a BDate argument


# 2a5e33a98056c2b92d46a6c9aae6da808c8524b1 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 38ac8def5a72de58d6ae4e82d8c4a6be1021e67e 01-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Largish cleanup sweep concerning the Locale Kit (sorry it got so big):
* refactored private/mutable stuff out of LocaleRoster into MutableLocaleRoster
* moved management of Locale/Time settings file and broadcasting of any changes
out of preflets and into MutableLocaleRoster
* added proper sorting to the listviews of the Locale preflet
* the Time preflet no longer overlaps long timezone names into the actual time
* several fixes with respect to leaking ICU objects, esp. in BCountry
* the locale roster no longer passes out references to its own BCountry object,
but uses copies, instead - this makes locking superfluous, as the clients'
BCountry objects can no longer be changed by the setting a new default
country in the locale roster
* removed pretty useless POSIX-style symbol fetching from BCountry - if we
need that at all, it should live in the dedicated formatter classes
* adjusted readonlybootprompt, dstcheck and Deskbar to the changed Locale API
* refactored existing Time-formatter into TimeUnitFormat and DurationFormat
(the latter of which is now used by AboutSystem)
* added stubs for Date, DateTime and Time formatters
* lots of coding style fixes throughout the Locale Kit and the Locale and Time
preflets
This will probably break most external apps making use of the Locale Kit - it
does break WebPositive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37831 a95241bf-73f2-0310-859d-f6bbb57e9c96