mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 12:56:45 -06:00
[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…
x
Reference in New Issue
Block a user