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 {
|
fun isCurrentYear(date: Date): Boolean {
|
||||||
return profile?.let { profile ->
|
return profile?.let { profile ->
|
||||||
return@let profile.dateSemester1Start >= date
|
return@let date >= profile.dateSemester1Start
|
||||||
} ?: false
|
} ?: false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isCurrentYear(dateTime: Long): Boolean {
|
fun isCurrentYear(dateTime: Long): Boolean {
|
||||||
return profile?.let { profile ->
|
return profile?.let { profile ->
|
||||||
return@let profile.dateSemester1Start.inMillis >= dateTime
|
return@let dateTime >= profile.dateSemester1Start.inMillis
|
||||||
} ?: false
|
} ?: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user