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).
This commit is contained in:
@@ -37,6 +37,14 @@ public:
|
||||
|
||||
static const BDateFormat* Default();
|
||||
|
||||
void SetLanguage(const BLanguage& newLanguage);
|
||||
void SetFormattingConventions(
|
||||
const BFormattingConventions& conventions);
|
||||
status_t GetDateFormat(BDateFormatStyle style,
|
||||
BString& outFormat) const;
|
||||
void SetDateFormat(BDateFormatStyle style,
|
||||
const BString& format);
|
||||
|
||||
// formatting
|
||||
|
||||
ssize_t Format(char* string, const size_t maxSize,
|
||||
|
||||
Reference in New Issue
Block a user