forked from github/szkolny
[Vulcan/Hebe] Fix checking for current year.
This commit is contained in:
parent
30aeb70647
commit
97c5acd6ba
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user