![]() |
Vault
4.1
|
This class holds a set of locale-specific text and other information used when formatting VInstant time stamp strings. More...
#include <vinstant.h>
Public Member Functions | |
| VInstantFormatterLocaleInfo () | |
| Constructs an empty locale info that you can modify. | |
Static Public Member Functions | |
| static const VInstantFormatterLocaleInfo & | getLocaleInfo (const VString &localeName) |
| Returns a reference to a global locale info object for a specific locale. | |
Public Attributes | |
| VString | CE_MARKER |
| The marker for the common era name, e.g. "CE" or "AD". | |
| VString | AM_MARKER |
| The marker for times before noon, e.g. "AM". | |
| VString | PM_MARKER |
| The marker for time after noon, e.g. "PM". | |
| VStringVector | MONTH_NAMES_SHORT |
| Short-form abbreviated month names, e.g. [0] = "Jan" ... [11] = "Dec". | |
| VStringVector | MONTH_NAMES_LONG |
| Long-form full month names, e.g. [0] = "January" ... [11] = "December". | |
| VStringVector | DAY_NAMES_SHORT |
| Short-form abbreviated day-of-week names, e.g. [0] = "Sun" ... [6] = "Sat". | |
| VStringVector | DAY_NAMES_LONG |
| Long-form full day-of-week names, e.g. [0] = "Sunday" ... [6] = "Saturday". | |
This class holds a set of locale-specific text and other information used when formatting VInstant time stamp strings.
The purpose is to decouple the text and rules specific to a locale from the formatting directive logic of VInstantFormatter itself. You can supply one of these when constructing a VInstantFormatter to control the format. Currently I have the default constructor creating US English strings and that's all, but you can build one for another locale and use it when appropriate.
Definition at line 1269 of file vinstant.h.
| VInstantFormatterLocaleInfo::VInstantFormatterLocaleInfo | ( | ) |
Constructs an empty locale info that you can modify.
(In reality, the default constructor currently fills in "en-us" locale info.)
Definition at line 1355 of file vinstant.cpp.
References DAY_NAMES_LONG, DAY_NAMES_SHORT, MONTH_NAMES_LONG, and MONTH_NAMES_SHORT.
| const VInstantFormatterLocaleInfo & VInstantFormatterLocaleInfo::getLocaleInfo | ( | const VString & | localeName | ) | [static] |
Returns a reference to a global locale info object for a specific locale.
Currently I do not actually track and return objects for different locales, so this is a future-proofing API. It always returns the US English info.
| localeName | the local name string (e.g. "en-us") |
Definition at line 1349 of file vinstant.cpp.