Skip to content

Commit

Permalink
Merge pull request #228 from effectivemade/backendApp/hotfix/recurren…
Browse files Browse the repository at this point in the history
…ce_until

Fix until convertation
  • Loading branch information
kiselev-danil authored Dec 8, 2023
2 parents 0a556fb + 74a9167 commit dbe4927
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ data class Recurrence(
)

private fun parceUntil(untilStr: String): Long {
//old
//2023 10 15 T 20 00 00 Z
//0123 45 67 8 90 12 34 5

val year: Int = untilStr.substring(0,4).toInt()//sb.toString().toInt()
//new
// 2023 12 24


val year: Int = untilStr.substring(0,4).toInt()
val month: Int = untilStr.substring(4,6).toInt()
val day: Int = untilStr.substring(6,8).toInt()
val hour: Int = untilStr.substring(9,11).toInt()
val min: Int = untilStr.substring(11,13).toInt()
val sec: Int = untilStr.substring(13,15).toInt()

val dt = Date(year - 1900, month, day, hour, min, sec)
val dt = Date(year - 1900, month, day)
return dt.time
}
}

0 comments on commit dbe4927

Please sign in to comment.