UncivDateFormat

object UncivDateFormat

Standardize date formatting so dates are presented in a consistent style and all decisions to change date handling are encapsulated here

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
formatDate
Link copied to clipboard
fun Date.formatDate(): String

Format a date to ISO format with minutes

hashCode
Link copied to clipboard
open fun hashCode(): Int
parseDate
Link copied to clipboard
fun String.parseDate(): Date

Parse an UTC date as passed by online API's example: "2021-04-11T14:43:33Z".parseDate()

toString
Link copied to clipboard
open fun toString(): String

Properties

standardFormat
Link copied to clipboard
private val standardFormat: SimpleDateFormat
utcFormat
Link copied to clipboard
private val utcFormat: SimpleDateFormat

Sources

jvm source
Link copied to clipboard