teller / com.levibostian.teller.type / AgeOfData

AgeOfData

data class AgeOfData

Custom data class to represent a length of time. This is created because Duration is Java 8 only (requires API 26 on Android). I also did not want to bring in a library for this one very small need so I decided to create my own thing.

Types

Unit

enum class Unit

Constructors

<init>

AgeOfData(time: Int, unit: Unit)

Custom data class to represent a length of time. This is created because Duration is Java 8 only (requires API 26 on Android). I also did not want to bring in a library for this one very small need so I decided to create my own thing.

Properties

time

val time: Int

unit

val unit: Unit

Functions

toDate

fun toDate(): Date