patternFormat

actual fun patternFormat(pattern: String, timeZone: KalugaTimeZone, locale: KalugaLocale): KalugaDateFormatter

Creates a KalugaDateFormatter using a custom Date format pattern. On iOS some user settings may take precedent over the format (i.e. using 12 hour clock). To prevent this, ensure that the provided locale is of a POSIX type. A convenience fixedPatternFormat method exists to default to this behaviour.

Parameters

pattern

The pattern to apply.

timeZone

The KalugaTimeZone for which the date should be formatted. Defaults to KalugaTimeZone.current.

locale

The KalugaLocale for which the date should be formatted. Defaults to KalugaLocale.defaultLocale.

expect fun patternFormat(pattern: String, timeZone: KalugaTimeZone = KalugaTimeZone.current(), locale: KalugaLocale = defaultLocale): KalugaDateFormatter

Creates a KalugaDateFormatter using a custom Date format pattern. On iOS some user settings may take precedent over the format (i.e. using 12 hour clock). To prevent this, ensure that the provided locale is of a POSIX type. A convenience fixedPatternFormat method exists to default to this behaviour.

Parameters

pattern

The pattern to apply.

timeZone

The KalugaTimeZone for which the date should be formatted. Defaults to KalugaTimeZone.current.

locale

The KalugaLocale for which the date should be formatted. Defaults to KalugaLocale.defaultLocale.

actual fun patternFormat(pattern: String, timeZone: KalugaTimeZone, locale: KalugaLocale): KalugaDateFormatter

Creates a KalugaDateFormatter using a custom Date format pattern. On iOS some user settings may take precedent over the format (i.e. using 12 hour clock). To prevent this, ensure that the provided locale is of a POSIX type. A convenience fixedPatternFormat method exists to default to this behaviour.

Parameters

pattern

The pattern to apply.

timeZone

The KalugaTimeZone for which the date should be formatted. Defaults to KalugaTimeZone.current.

locale

The KalugaLocale for which the date should be formatted. Defaults to KalugaLocale.defaultLocale.

actual fun patternFormat(pattern: String, timeZone: KalugaTimeZone, locale: KalugaLocale): KalugaDateFormatter

Creates a KalugaDateFormatter using a custom Date format pattern. On iOS some user settings may take precedent over the format (i.e. using 12 hour clock). To prevent this, ensure that the provided locale is of a POSIX type. A convenience fixedPatternFormat method exists to default to this behaviour.

Parameters

pattern

The pattern to apply.

timeZone

The KalugaTimeZone for which the date should be formatted. Defaults to KalugaTimeZone.current.

locale

The KalugaLocale for which the date should be formatted. Defaults to KalugaLocale.defaultLocale.

actual fun patternFormat(pattern: String, timeZone: KalugaTimeZone, locale: KalugaLocale): KalugaDateFormatter

Creates a KalugaDateFormatter using a custom Date format pattern. On iOS some user settings may take precedent over the format (i.e. using 12 hour clock). To prevent this, ensure that the provided locale is of a POSIX type. A convenience fixedPatternFormat method exists to default to this behaviour.

Parameters

pattern

The pattern to apply.

timeZone

The KalugaTimeZone for which the date should be formatted. Defaults to KalugaTimeZone.current.

locale

The KalugaLocale for which the date should be formatted. Defaults to KalugaLocale.defaultLocale.