toString

fun Date.toString(toFormat: String, locale: Locale = Locale.getDefault()): String

Extension function of DateExtension to format Date to a String

Return

parsed String from the given Date

Receiver

Date

Parameters

toFormat

pattern of the String to format

locale

type of locale to format the Date