#include <wx/datetime.h>
Class representing a name form.
This class describes the form of month or weekday names used in formatting a date. It contains attributes for the requested name length and the formatting context. It is used as a parameter to the GetWeekDayName() and GetMonthName() functions.
Public Member Functions | |
NameForm (NameFlags flags=Name_Full) | |
Constructor for a name form. More... | |
NameForm & | Full () |
Set the flag for full month or weekday names. More... | |
NameForm & | Abbr () |
Set the flag for abbreviated month or weekday names. More... | |
NameForm & | Shortest () |
Set the flag for shortest month or weekday names. More... | |
NameForm & | Formatting () |
Set the context for date formatting. More... | |
NameForm & | Standalone () |
Set the context for standalone use. More... | |
NameFlags | GetFlags () const |
Return the flags describing the requested name length. More... | |
NameContext | GetContext () const |
Return the context of name usage. More... | |
Constructor for a name form.
Initializes this object to use the given form of the name (full by default) in the formatting context.
Note that this constructor is not explicit, to allow the existing code which passes wxDateTime::NameFlags to various functions now taking NameForm to work. Please beware of the implicit conversions here.
NameForm& wxDateTime::NameForm::Abbr | ( | ) |
Set the flag for abbreviated month or weekday names.
NameForm& wxDateTime::NameForm::Formatting | ( | ) |
Set the context for date formatting.
In some languages, month and day names have different forms depending on whether they're used on their own, e.g. as names of the months in the calendar, or as part of a date representation.
Use this function if you need to localize a date format or in another similar context.
NameForm& wxDateTime::NameForm::Full | ( | ) |
Set the flag for full month or weekday names.
NameContext wxDateTime::NameForm::GetContext | ( | ) | const |
Return the context of name usage.
NameFlags wxDateTime::NameForm::GetFlags | ( | ) | const |
Return the flags describing the requested name length.
NameForm& wxDateTime::NameForm::Shortest | ( | ) |
Set the flag for shortest month or weekday names.
NameForm& wxDateTime::NameForm::Standalone | ( | ) |
Set the context for standalone use.