RichUtils / pyxis.uzuki.live.richutilskt.utils / java.util.Date

Extensions for java.util.Date

asDateString

fun Date.asDateString(format: String? = "yyyy-MM-dd HH:mm:ss"): String

format date with DateFormat string

normalizeDate

fun Date.normalizeDate(timeZone: String = "UTC"): Date

normalize the date to the beginning of the day with given timeZone it equals to Time.getJulianDay()