GMTDate

data class GMTDate : Comparable<GMTDate>

Date in GMT timezone

Properties

dayOfMonth

val dayOfMonth: Int

: day of month from 1 to 31

dayOfWeek

val dayOfWeek: WeekDay

an instance of the corresponding day of week

dayOfYear

val dayOfYear: Int

: day of year from 1 to 366

hours

val hours: Int

: hours from 0 to 23

minutes

val minutes: Int

: minutes from 0 to 59

month

val month: Month

an instance of the corresponding month

seconds

val seconds: Int

: seconds from 0 to 60(last is for leap second)

timestamp

val timestamp: Long

is a number of epoch milliseconds

year

val year: Int

: year in common era(CE: https://en.wikipedia.org/wiki/Common_Era)

Functions

compareTo

fun compareTo(other: GMTDate): Int

Companion Object Properties

START

val START: GMTDate

An instance of GMTDate corresponding to the epoch beginning

Extension Functions

minus

operator fun GMTDate.minus(milliseconds: Long): GMTDate

Subtracts the specified number of milliseconds

plus

operator fun GMTDate.plus(milliseconds: Long): GMTDate

Adds the specified number of milliseconds

toHttpDate

fun GMTDate.toHttpDate(): String

Convert GMTDate to valid http date String

toJvmDate

fun GMTDate.toJvmDate(): Date

Convert to Date

truncateToSeconds

fun GMTDate.truncateToSeconds(): GMTDate

Truncate to seconds by discarding sub-second part