System::Globalization::DateTimeFormatInfo Class Referencefinal

Inherits System::Object, System::IFormatProvider, and System::ICloneable.

Public Member Functions

SharedPtr< ObjectGetFormat (const TypeInfo &format_type) override
 
SharedPtr< ObjectClone () override
 
bool get_IsReadOnly () const
 
String get_ShortDatePattern () const
 
void set_ShortDatePattern (const String &value)
 
String get_ShortTimePattern () const
 
void set_ShortTimePattern (const String &value)
 
String get_LongDatePattern () const
 
void set_LongDatePattern (const String &value)
 
String get_LongTimePattern () const
 
void set_LongTimePattern (const String &value)
 
String get_DateSeparator () const
 
void set_DateSeparator (const String &value)
 
String get_TimeSeparator () const
 
void set_TimeSeparator (const String &value)
 
String get_PMDesignator () const
 
void set_PMDesignator (const String &value)
 
String get_AMDesignator () const
 
void set_AMDesignator (const String &value)
 
ArrayPtr< Stringget_AbbreviatedDayNames () const
 
void set_AbbreviatedDayNames (const ArrayPtr< String > &value)
 
ArrayPtr< Stringget_AbbreviatedMonthGenitiveNames () const
 
void set_AbbreviatedMonthGenitiveNames (const ArrayPtr< String > &value)
 
ArrayPtr< Stringget_AbbreviatedMonthNames () const
 
void set_AbbreviatedMonthNames (const ArrayPtr< String > &value)
 
SharedPtr< Calendarget_Calendar () const
 
void set_Calendar (const SharedPtr< Calendar > &value)
 
CalendarWeekRule get_CalendarWeekRule () const
 
void set_CalendarWeekRule (CalendarWeekRule value)
 
ArrayPtr< Stringget_DayNames () const
 
void set_DayNames (const ArrayPtr< String > &value)
 
DayOfWeek get_FirstDayOfWeek () const
 
void set_FirstDayOfWeek (DayOfWeek value)
 
String get_FullDateTimePattern () const
 
void set_FullDateTimePattern (const String &value)
 
String get_MonthDayPattern () const
 
void set_MonthDayPattern (const String &value)
 
ArrayPtr< Stringget_MonthGenitiveNames () const
 
void set_MonthGenitiveNames (const ArrayPtr< String > &value)
 
ArrayPtr< Stringget_MonthNames () const
 
void set_MonthNames (const ArrayPtr< String > &value)
 
String get_RFC1123Pattern () const
 
ArrayPtr< Stringget_ShortestDayNames () const
 
void set_ShortestDayNames (const ArrayPtr< String > &value)
 
String get_SortableDateTimePattern () const
 
String get_UniversalSortableDateTimePattern () const
 
String get_YearMonthPattern () const
 
void set_YearMonthPattern (const String &value)
 
String GetAbbreviatedDayName (DayOfWeek day_of_week) const
 
String GetAbbreviatedEraName (int era) const
 
String GetAbbreviatedMonthName (int month) const
 
String GetDayName (DayOfWeek day_of_week) const
 
int GetEra (const String &era_name) const
 
String GetEraName (int era) const
 
String GetMonthName (int month) const
 
String GetMonthGenitiveName (int month) const
 
String GetLeapYearMonthName (int month) const
 
String get_NativeCalendarName () const
 
ArrayPtr< StringGetAllDateTimePatterns () const
 
ArrayPtr< StringGetAllDateTimePatterns (char16_t format) const
 
void SetAllDateTimePatterns (const ArrayPtr< String > &patterns, char16_t format)
 Sets patterns for the specified format. More...
 
String GetShortestDayName (DayOfWeek day_of_week) const
 Gets shortes name for the specified day of week. More...
 
DateTimeFormatInfooperator= (const DateTimeFormatInfo &)=delete
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Static Public Member Functions

static const DateTimeFormatInfoPtrget_InvariantInfo ()
 
static DateTimeFormatInfoPtr get_CurrentInfo ()
 
static DateTimeFormatInfoPtr GetInstance (const IFormatProviderPtr &provider)
 
static DateTimeFormatInfoPtr ReadOnly (const DateTimeFormatInfoPtr &info)
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Detailed Description

Set of date and time formatting parameters. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Member Function Documentation

◆ Clone()

SharedPtr<Object> System::Globalization::DateTimeFormatInfo::Clone ( )
overridevirtual

Clones format info.

Returns
Newly created copy of format info object.

Implements System::ICloneable.

◆ get_AbbreviatedDayNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_AbbreviatedDayNames ( ) const

Gets abbreviated day names.

Returns
Array of abbreviated day names, starting with Sunday.

◆ get_AbbreviatedMonthGenitiveNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_AbbreviatedMonthGenitiveNames ( ) const

Gets abbreviated month names in genitive form.

Returns
Array of abbreviated month names, starting with January.

◆ get_AbbreviatedMonthNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_AbbreviatedMonthNames ( ) const

Gets abbreviated month names.

Returns
Array of abbreviated month names, starting with January.

◆ get_AMDesignator()

String System::Globalization::DateTimeFormatInfo::get_AMDesignator ( ) const

Gets AM designator.

Returns
AM designator string.

◆ get_Calendar()

SharedPtr<Calendar> System::Globalization::DateTimeFormatInfo::get_Calendar ( ) const

Gets calendar associated with formatter.

Returns
Calendar objects.

◆ get_CalendarWeekRule()

CalendarWeekRule System::Globalization::DateTimeFormatInfo::get_CalendarWeekRule ( ) const

Gets calendar week rule associated with formatter.

Returns
Week rule.

◆ get_CurrentInfo()

static DateTimeFormatInfoPtr System::Globalization::DateTimeFormatInfo::get_CurrentInfo ( )
static

Gets current thread's date and time formatter.

Returns
Format info object.

◆ get_DateSeparator()

String System::Globalization::DateTimeFormatInfo::get_DateSeparator ( ) const

Gets date separator.

Returns
Date components separator character.

◆ get_DayNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_DayNames ( ) const

Gets day names.

Returns
Array of day names, starting with Sunday.

◆ get_FirstDayOfWeek()

DayOfWeek System::Globalization::DateTimeFormatInfo::get_FirstDayOfWeek ( ) const

Gets first day of week.

Returns
Wek day.

◆ get_FullDateTimePattern()

String System::Globalization::DateTimeFormatInfo::get_FullDateTimePattern ( ) const

Gets full date and time pattern.

Returns
Format string.

◆ get_InvariantInfo()

static const DateTimeFormatInfoPtr& System::Globalization::DateTimeFormatInfo::get_InvariantInfo ( )
static

Gets invariant date and time formatter.

Returns
Format info object.

◆ get_IsReadOnly()

bool System::Globalization::DateTimeFormatInfo::get_IsReadOnly ( ) const

Checks whether formatter is read-only.

Returns
True if formatter is read-only, false otherwise.

◆ get_LongDatePattern()

String System::Globalization::DateTimeFormatInfo::get_LongDatePattern ( ) const

Gets long date pattern.

Returns
Format string.

◆ get_LongTimePattern()

String System::Globalization::DateTimeFormatInfo::get_LongTimePattern ( ) const

Gets long time pattern.

Returns
Format string.

◆ get_MonthDayPattern()

String System::Globalization::DateTimeFormatInfo::get_MonthDayPattern ( ) const

Gets month day pattern.

Returns
Format string.

◆ get_MonthGenitiveNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_MonthGenitiveNames ( ) const

Gets month names in genitive form.

Returns
Array of month names, starting with January.

◆ get_MonthNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_MonthNames ( ) const

Gets month names.

Returns
Array of month names, starting with January.

◆ get_NativeCalendarName()

String System::Globalization::DateTimeFormatInfo::get_NativeCalendarName ( ) const

Gets native calendar name if available.

Returns
Native calendar name.

◆ get_PMDesignator()

String System::Globalization::DateTimeFormatInfo::get_PMDesignator ( ) const

Gets PM designator.

Returns
PM designator string.

◆ get_RFC1123Pattern()

String System::Globalization::DateTimeFormatInfo::get_RFC1123Pattern ( ) const

Gets RFC1123 pattern.

Returns
Format string.

◆ get_ShortDatePattern()

String System::Globalization::DateTimeFormatInfo::get_ShortDatePattern ( ) const

Gets short date pattern.

Returns
Format string.

◆ get_ShortestDayNames()

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::get_ShortestDayNames ( ) const

Gets shortest day names possible.

Returns
Array of shortest day names possible, starting with Sunday.

◆ get_ShortTimePattern()

String System::Globalization::DateTimeFormatInfo::get_ShortTimePattern ( ) const

Gets short time pattern.

Returns
Format string.

◆ get_SortableDateTimePattern()

String System::Globalization::DateTimeFormatInfo::get_SortableDateTimePattern ( ) const

Gets sortable date and time pattern.

Returns
Format string.

◆ get_TimeSeparator()

String System::Globalization::DateTimeFormatInfo::get_TimeSeparator ( ) const

Gets time separator.

Returns
Time components separator character.

◆ get_UniversalSortableDateTimePattern()

String System::Globalization::DateTimeFormatInfo::get_UniversalSortableDateTimePattern ( ) const

Gets universal sortable date and time pattern.

Returns
Format string.

◆ get_YearMonthPattern()

String System::Globalization::DateTimeFormatInfo::get_YearMonthPattern ( ) const

Gets year and month pattern.

Returns
Format string.

◆ GetAbbreviatedDayName()

String System::Globalization::DateTimeFormatInfo::GetAbbreviatedDayName ( DayOfWeek  day_of_week) const

Gets abbreviated week day name.

Parameters
day_of_weekDay to get name of.
Returns
Week day name.

◆ GetAbbreviatedEraName()

String System::Globalization::DateTimeFormatInfo::GetAbbreviatedEraName ( int  era) const

Gets abbreviated era name.

Parameters
eraEra to get name of.
Returns
Era name.

◆ GetAbbreviatedMonthName()

String System::Globalization::DateTimeFormatInfo::GetAbbreviatedMonthName ( int  month) const

Gets abbreviated month name.

Parameters
monthMonth to get name of.
Returns
Month name.

◆ GetAllDateTimePatterns() [1/2]

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::GetAllDateTimePatterns ( ) const

Gets all patterns in which date and time values can be formatted.

Returns
Array of patterns.

◆ GetAllDateTimePatterns() [2/2]

ArrayPtr<String> System::Globalization::DateTimeFormatInfo::GetAllDateTimePatterns ( char16_t  format) const

Gets all patterns in which date and time values can be formatted using specified format string.

Returns
Array of patterns.

◆ GetDayName()

String System::Globalization::DateTimeFormatInfo::GetDayName ( DayOfWeek  day_of_week) const

Gets week day name.

Parameters
day_of_weekDay to get name of.
Returns
Week day name.

◆ GetEra()

int System::Globalization::DateTimeFormatInfo::GetEra ( const String era_name) const

Gets era by name.

Parameters
era_nameEra name.
Returns
Era index.

◆ GetEraName()

String System::Globalization::DateTimeFormatInfo::GetEraName ( int  era) const

Gets era name.

Parameters
eraEra to get name of.
Returns
Era name.

◆ GetFormat()

SharedPtr<Object> System::Globalization::DateTimeFormatInfo::GetFormat ( const TypeInfo format_type)
overridevirtual

Gets formatter of specific type.

Parameters
format_typeType of formatter to get; only DateTimeFormatInfo type is supported.
Returns
Formatter or null if not availsable.

Implements System::IFormatProvider.

◆ GetInstance()

static DateTimeFormatInfoPtr System::Globalization::DateTimeFormatInfo::GetInstance ( const IFormatProviderPtr provider)
static

Gets formatter associated with format provider.

Parameters
providerProvider to get format for.
Returns
Formatter associated with format provider or current thread's format if unavailable.

◆ GetLeapYearMonthName()

String System::Globalization::DateTimeFormatInfo::GetLeapYearMonthName ( int  month) const

Gets leap-year month name.

Parameters
monthMonth to get name of.
Returns
Month name.

◆ GetMonthGenitiveName()

String System::Globalization::DateTimeFormatInfo::GetMonthGenitiveName ( int  month) const

Gets genitive month name.

Parameters
monthMonth to get name of.
Returns
Month name.

◆ GetMonthName()

String System::Globalization::DateTimeFormatInfo::GetMonthName ( int  month) const

Gets month name.

Parameters
monthMonth to get name of.
Returns
Month name.

◆ GetShortestDayName()

String System::Globalization::DateTimeFormatInfo::GetShortestDayName ( DayOfWeek  day_of_week) const

Gets shortes name for the specified day of week.

◆ operator=()

DateTimeFormatInfo& System::Globalization::DateTimeFormatInfo::operator= ( const DateTimeFormatInfo )
delete

◆ ReadOnly()

static DateTimeFormatInfoPtr System::Globalization::DateTimeFormatInfo::ReadOnly ( const DateTimeFormatInfoPtr info)
static

Gets read-only version of formatter.

Parameters
infoFormatter to get read-only version of.
Returns
if info is read-only, returns it, otherwise creates a copy of it and marks it as read-only.

◆ set_AbbreviatedDayNames()

void System::Globalization::DateTimeFormatInfo::set_AbbreviatedDayNames ( const ArrayPtr< String > &  value)

Sets abbreviated day names.

Parameters
valueArray of abbreviated day names, starting with Sunday.

◆ set_AbbreviatedMonthGenitiveNames()

void System::Globalization::DateTimeFormatInfo::set_AbbreviatedMonthGenitiveNames ( const ArrayPtr< String > &  value)

Sets abbreviated month names in genitive form.

Parameters
valueArray of abbreviated month names, starting with January.

◆ set_AbbreviatedMonthNames()

void System::Globalization::DateTimeFormatInfo::set_AbbreviatedMonthNames ( const ArrayPtr< String > &  value)

Sets abbreviated month names.

Parameters
valueArray of abbreviated month names, starting with January.

◆ set_AMDesignator()

void System::Globalization::DateTimeFormatInfo::set_AMDesignator ( const String value)

Sets AM designator.

Parameters
valueAM designator string.

◆ set_Calendar()

void System::Globalization::DateTimeFormatInfo::set_Calendar ( const SharedPtr< Calendar > &  value)

Sets calendar associated with formatter.

Parameters
valueCalendar object.

◆ set_CalendarWeekRule()

void System::Globalization::DateTimeFormatInfo::set_CalendarWeekRule ( CalendarWeekRule  value)

Sets calendar week rule associated with formatter.

Parameters
valueWeek rule.

◆ set_DateSeparator()

void System::Globalization::DateTimeFormatInfo::set_DateSeparator ( const String value)

Sets date separator.

Parameters
valueDate separator.

◆ set_DayNames()

void System::Globalization::DateTimeFormatInfo::set_DayNames ( const ArrayPtr< String > &  value)

Sets day names.

Parameters
valueArray of day names, starting with Sunday.

◆ set_FirstDayOfWeek()

void System::Globalization::DateTimeFormatInfo::set_FirstDayOfWeek ( DayOfWeek  value)

Sets first day of week.

Parameters
valueWeek day.

◆ set_FullDateTimePattern()

void System::Globalization::DateTimeFormatInfo::set_FullDateTimePattern ( const String value)

Sets full date and time pattern.

Parameters
valueFormat string.

◆ set_LongDatePattern()

void System::Globalization::DateTimeFormatInfo::set_LongDatePattern ( const String value)

Sets long date pattern.

Parameters
valueFormat string.

◆ set_LongTimePattern()

void System::Globalization::DateTimeFormatInfo::set_LongTimePattern ( const String value)

Sets long time pattern.

Parameters
valueFormat string.

◆ set_MonthDayPattern()

void System::Globalization::DateTimeFormatInfo::set_MonthDayPattern ( const String value)

Sets month day pattern.

Parameters
valueFormat string.

◆ set_MonthGenitiveNames()

void System::Globalization::DateTimeFormatInfo::set_MonthGenitiveNames ( const ArrayPtr< String > &  value)

Sets month names in genitive form.

Parameters
valueArray of month names, starting with January.

◆ set_MonthNames()

void System::Globalization::DateTimeFormatInfo::set_MonthNames ( const ArrayPtr< String > &  value)

Sets month names.

Parameters
valueArray of month names, starting with January.

◆ set_PMDesignator()

void System::Globalization::DateTimeFormatInfo::set_PMDesignator ( const String value)

Sets PM designator.

Parameters
valuePM designator string.

◆ set_ShortDatePattern()

void System::Globalization::DateTimeFormatInfo::set_ShortDatePattern ( const String value)

Sets short date pattern.

Parameters
valueFormat string.

◆ set_ShortestDayNames()

void System::Globalization::DateTimeFormatInfo::set_ShortestDayNames ( const ArrayPtr< String > &  value)

Sets shortest day names possible.

Parameters
valueArray of shortest day names possible, starting with Sunday.

◆ set_ShortTimePattern()

void System::Globalization::DateTimeFormatInfo::set_ShortTimePattern ( const String value)

Sets short time pattern.

Parameters
valueFormat string.

◆ set_TimeSeparator()

void System::Globalization::DateTimeFormatInfo::set_TimeSeparator ( const String value)

Sets time separator.

Returns
Time components separator character.

◆ set_YearMonthPattern()

void System::Globalization::DateTimeFormatInfo::set_YearMonthPattern ( const String value)

Sets year and month pattern.

Parameters
valueFormat string.

◆ SetAllDateTimePatterns()

void System::Globalization::DateTimeFormatInfo::SetAllDateTimePatterns ( const ArrayPtr< String > &  patterns,
char16_t  format 
)

Sets patterns for the specified format.