core / io.islandtime.format / DateTimeTextProvider / amPmTextFor

amPmTextFor

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) open fun amPmTextFor(value: Long, locale: <ERROR CLASS>): String?

Get the localized AM/PM text.

Parameters

value - 0 for AM or 1 for PM

locale - the locale

Exceptions

DateTimeException - if the value is not 0 or 1

Return
the localized AM/PM text or null if unavailable

(jvm) open fun amPmTextFor(value: Long, locale: Locale): String?

Get the localized AM/PM text.

Parameters

value - 0 for AM or 1 for PM

locale - the locale

Exceptions

DateTimeException - if the value is not 0 or 1

Return
the localized AM/PM text or null if unavailable