Package-level declarations

Properties

Link copied to clipboard

Formats timestamp to 'date month' format (e.g. '19 Dec').

Link copied to clipboard

Formats timestamp to 'date month, year' format (e.g. '19 Dec, 2022').

Link copied to clipboard

Formats timestamp to 'day of week, date month' format (e.g. 'Wed, 19 Dec').

Link copied to clipboard

Flag indicating that the timestamp is of this year.

Link copied to clipboard

Flag indicating that the timestamp is today.

Link copied to clipboard

Flag indicating that the timestamp is yesterday.

Link copied to clipboard

Formats timestamp to 'month/date/year' format (e.g. '12/19/2022').

Link copied to clipboard

Get time the difference. Date shows 'date month' format (e.g. '19 Dec'). Minimum resolution is 1 minute.

Link copied to clipboard

Formats timestamp for timeline message. If the timestamp is from this year, it shows 'day of week, date month' format (e.g. 'Wed, 19 Dec'). If the timestamp is from a different year, it shows 'date month, year' format (e.g. '19 Dec, 2022').

Functions

Link copied to clipboard

Checks if given milliseconds is of same date as this.

Link copied to clipboard

Checks if given milliseconds is of same date and time as this, up to minutes.

Link copied to clipboard
fun Long.formatDateTime(context: <Error class: unknown class>): String

If this timestamp is of a different date, display the date. If it is of the same date, display the time.

Link copied to clipboard
fun Long.formatTime(context: <Error class: unknown class>): String

Formats timestamp to 'time' format (e.g. '12:00 PM').