iOS Guides | Samples

Foundation.NSDateFormatter Class

Used to parse and render dates in various forms.

See Also: NSDateFormatter

Syntax

[Foundation.Register("NSDateFormatter", true)]
public class NSDateFormatter : NSFormatter

Related content

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of Foundation.NSDateFormatter are listed below.

See Also: NSFormatter

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

AMSymbolString. The AM symbol for this formatter.
BehaviorNSDateFormatterBehavior. The NSDateFormatterBehavior object for this formatter.
CalendarNSCalendar. The calendar for this formatter.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
DateFormatString. The date format string used by this formatter.
DateStyleNSDateFormatterStyle. The date style used by this formatter.
static
DefaultBehaviorNSDateFormatterBehavior. Factory method producing default NSDateFormatterBehavior.
DefaultDateNSDate. The default date for this formatter.
DoesRelativeDateFormattingBoolean.
EraSymbolsString[]. The array of era symbols for this formatter.
FormattingContextNSFormattingContext.
GeneratesCalendarDatesBoolean. Developers should not use this method.
GregorianStartDateNSDate. The start date of the Gregorian calendar.
IsLenientBoolean. Whether this formatter uses heuristics when parsing a string.
LocaleNSLocale. The locale of this formatter.
LongEraSymbolsString[]. The long era symbols for this formatter.
MonthSymbolsString[]. The month symbols for this formatter.
PMSymbolString. The PM symbol of this formatter.
QuarterSymbolsString[]. The quarter symbols of this formatter.
ShortMonthSymbolsString[]. The short month symbols of this formatter.
ShortQuarterSymbolsString[]. The short quarter symbols for this formatter.
ShortStandaloneMonthSymbolsString[]. The standalone month symbols for this formatter.
ShortStandaloneQuarterSymbolsString[]. The short standalone quarter symbols for this formatter.
ShortStandaloneWeekdaySymbolsString[]. The short standalone weekday symbols for this formatter.
ShortWeekdaySymbolsString[]. The short weekday symbols for this formatter.
StandaloneMonthSymbolsString[]. The standalone month symbols for this formatter.
StandaloneQuarterSymbolsString[]. The standalone quarter symbols for this formatter.
StandaloneWeekdaySymbolsString[]. The standalone weekday symbols for this formatter.
TimeStyleNSDateFormatterStyle. The time style for this formatter.
TimeZoneNSTimeZone. The time zone for this formatter.
TwoDigitStartDateNSDate. The earliest date that can be specified with a two-digit year specifier.
VeryShortMonthSymbolsString[]. The very short month symbols for this formatter.
VeryShortStandaloneMonthSymbolsString[]. The very short month symbols for this formatter.
VeryShortStandaloneWeekdaySymbolsString[]. The very short standalone weekday symbols for this formatter.
VeryShortWeekdaySymbolsString[]. The very short weekday symbols for this formatter.
WeekdaySymbolsString[]. The weekday symbols for this formatter.

Public Methods

static
GetDateFormatFromTemplate(String, nuint, NSLocale) : String
Parse(String) : NSDate
Attempts to convert a string into an NSDate.
SetLocalizedDateFormatFromTemplate(String)
static
ToLocalizedString(NSDate, NSDateFormatterStyle, NSDateFormatterStyle) : String
Static method to create a localized string, using the specified date, dateStyle, and timeStyle.
ToString(NSDate) : String
Returns a string representation of the value of the current instance.