format

Formats this moment using the chain-based DSL.

val text = moment format { iso.date }

Return

the formatted string.

Parameters

block

a VerdandiFormatScope receiver that produces a VerdandiFormatPattern.


infix fun format(pattern: String): String

Formats this moment using a pattern string.

val text = moment format "yyyy-MM-dd HH:mm"

See Verdandi for the full directive table.

Return

the formatted string.

Parameters

pattern

the format pattern.