Skip to content

DateFormatterBinding

Michael edited this page May 3, 2016 · 3 revisions

Property binding that specifies and optionally customizes a copy of an instance of NSNumberFormatter.

The number formatter binding is based on and inherits all features from FormatterBinding.

Binding Source

You can specify a key path referencing an NSNumberFormatter instance like $root.myNumberFormatterInstance or leave the primary expression empty (in which case the binding will create a new NSNumberFormatter instance).

If you specify the formatter using a key path and also define attributes, the binding will create a copy of the formatter (to ensure that the original formatter is not modified by the binding).

Binding Target

A property of type NSDateFormatterBinding

Binding Attributes

Predefined Attributes

Attribute Description
dateStyle .NoStyle, .ShortStyle, .MediumStyle, .LongStyle, .FullStyle
timeStyle .NoStyle, .ShortStyle, .MediumStyle, .LongStyle, .FullStyle
calendar Calendar identifier or key path to NSCalendar instance
timeZone Time zone name or abbreviation or key path to NSTimeZone instance
locale referenced by its identifier, f.e. "de_DE" or key path to NSLocale instance

Dynamic Attributes

See FormatterBinding