asString

fun LocalTime.asString(use12h: Boolean = false, addSecondsIfZero: Boolean = false): String

Same as toString but gives you a choice on whether to use 12H scheme. toString uses asString(false).

Return

a string representation of this time

Parameters

addSecondsIfZero

If the seconds value is equal to 0, should include them in the representation? e.g.:

use12h

whether to represent time in 12-hour format (AM/PM letters not added). Mind that deserializing the resulting string back to LocalTime won't result in a valid value, if you have this parameter true true => "17:00:00", false => "17:00".

Formats this using formatter


Gets the DayOfWeek.getDisplayName of this using system default locale

Return

ISO8601 -> Monday = 1


fun Month.asString(textStyle: TextStyle = TextStyle.FULL, locale: Locale = Locale.getDefault()): String

Returns a string representation of this using specified textStyle and locale