Version: 3.3.0
wxDateTime::NameForm Class Reference

#include <wx/datetime.h>

Detailed Description

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.

Since
3.3.0

Public Member Functions

 NameForm (NameFlags flags=Name_Full)
 Constructor for a name form. More...
 
NameFormFull ()
 Set the flag for full month or weekday names. More...
 
NameFormAbbr ()
 Set the flag for abbreviated month or weekday names. More...
 
NameFormShortest ()
 Set the flag for shortest month or weekday names. More...
 
NameFormFormatting ()
 Set the context for date formatting. More...
 
NameFormStandalone ()
 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 & Destructor Documentation

◆ NameForm()

wxDateTime::NameForm::NameForm ( NameFlags  flags = Name_Full)
inline

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.

Member Function Documentation

◆ Abbr()

NameForm& wxDateTime::NameForm::Abbr ( )

Set the flag for abbreviated month or weekday names.

◆ Formatting()

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.

See also
Standalone()

◆ Full()

NameForm& wxDateTime::NameForm::Full ( )

Set the flag for full month or weekday names.

◆ GetContext()

NameContext wxDateTime::NameForm::GetContext ( ) const

Return the context of name usage.

◆ GetFlags()

NameFlags wxDateTime::NameForm::GetFlags ( ) const

Return the flags describing the requested name length.

◆ Shortest()

NameForm& wxDateTime::NameForm::Shortest ( )

Set the flag for shortest month or weekday names.

◆ Standalone()

NameForm& wxDateTime::NameForm::Standalone ( )

Set the context for standalone use.