[Vulcan/Hebe] Fix checking for current year.

This commit is contained in:
Kuba Szczodrzyński 2021-02-22 22:59:02 +01:00
parent 30aeb70647
commit 97c5acd6ba

View File

@ -152,13 +152,13 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
fun isCurrentYear(date: Date): Boolean {
return profile?.let { profile ->
return@let profile.dateSemester1Start >= date
return@let date >= profile.dateSemester1Start
} ?: false
}
fun isCurrentYear(dateTime: Long): Boolean {
return profile?.let { profile ->
return@let profile.dateSemester1Start.inMillis >= dateTime
return@let dateTime >= profile.dateSemester1Start.inMillis
} ?: false
}