mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
just updating things so that I can have a backup point...
Former-commit-id: 0a5a6d7f68ee1a96562532572c8d45fe102d3c25 Former-commit-id: a1a78f61f2fe2a8707e47633caa6cd67a829b35e
This commit is contained in:
@@ -66,7 +66,7 @@ class WorldTime {
|
||||
val YEAR_DAYS: Int = 365
|
||||
|
||||
fun parseTime(s: String): Int =
|
||||
if (s.length >= 4) {
|
||||
if (s.length >= 4 && s.contains('h')) {
|
||||
s.toLowerCase().substringBefore('h').toInt() * WorldTime.HOUR_SEC +
|
||||
s.toLowerCase().substringAfter('h').toInt() * WorldTime.MINUTE_SEC
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user