Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created May 28, 2022 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aqua30/b846fe33e3ad076be06d16dc40c622a7 to your computer and use it in GitHub Desktop.
Save aqua30/b846fe33e3ad076be06d16dc40c622a7 to your computer and use it in GitHub Desktop.
data class TimeData(
val hours: TimeUnit = TimeUnit(),
val mins: TimeUnit = TimeUnit(),
val secs: TimeUnit = TimeUnit(),
) {
fun isDataFull() = hours.leftDigit > 0
fun isDataEmpty() =
hours.leftDigit == 0 && hours.rightDigit == 0
&& mins.leftDigit == 0 && mins.rightDigit == 0
&& secs.leftDigit == 0 && secs.rightDigit == 0
fun isHoursHalfFull() = hours.leftDigit == 0 && hours.rightDigit > 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment