getStringByNow

open fun getStringByNow(timeSpan: Long, unit: Int): String

Return the formatted time string differ time span by now.

The pattern is {@code yyyy-MM-dd HH:mm:ss}.

Return

the formatted time string differ time span by now

Parameters

timeSpan

The time span.

unit

The unit of time span.

open fun getStringByNow(timeSpan: Long, format: DateFormat, unit: Int): String

Return the formatted time string differ time span by now.

Return

the formatted time string differ time span by now

Parameters

timeSpan

The time span.

format

The format.

unit

The unit of time span.