mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fixing IllegalInstantException occurring in some cases
This commit is contained in:
@@ -66,7 +66,7 @@ object Formatter {
|
|||||||
|
|
||||||
fun getDateTimeFromCode(dayCode: String) = DateTimeFormat.forPattern(DAYCODE_PATTERN).withZone(DateTimeZone.UTC).parseDateTime(dayCode)
|
fun getDateTimeFromCode(dayCode: String) = DateTimeFormat.forPattern(DAYCODE_PATTERN).withZone(DateTimeZone.UTC).parseDateTime(dayCode)
|
||||||
|
|
||||||
fun getLocalDateTimeFromCode(dayCode: String) = DateTimeFormat.forPattern(DAYCODE_PATTERN).withZone(DateTimeZone.getDefault()).parseDateTime(dayCode)
|
fun getLocalDateTimeFromCode(dayCode: String) = DateTimeFormat.forPattern(DAYCODE_PATTERN).withZone(DateTimeZone.getDefault()).parseLocalDate(dayCode).toDateTimeAtStartOfDay()
|
||||||
|
|
||||||
fun getTimeFromTS(context: Context, ts: Int) = getTime(context, getDateTimeFromTS(ts))
|
fun getTimeFromTS(context: Context, ts: Int) = getTime(context, getDateTimeFromTS(ts))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user