TimestampUtils

Timestamp Utils

Functions

Link copied to clipboard
fun areDateDifferenceGreaterThanMillis(firstDate: Date, secondDate: Date, millis: Long): Boolean

Returns whether two dates differs more that input milliseconds

Link copied to clipboard
fun isSameDay(timestamp1: Long, timestamp2: Long): Boolean

Check if two timestamps lie in the same day

Link copied to clipboard
fun parseDay(context: Context, timestamp: Long): String

Parse a UTC millis timestamp into a human readable day. This function takes into account the current zone offset.

Link copied to clipboard
fun parseTime(timestamp: Long): String

Parse a UTC millis timestamp into a human readable time. This function takes into account the current zone offset.

Link copied to clipboard
fun parseTimestamp(context: Context, timestamp: Long): String

Parse a UTC millis timestamp into a human readable timestamp. This function takes into account the current zone offset.