Skip to content

Commit

Permalink
[CHORE] LocalDateTimeParser 함수 parameter 네이밍 변경 (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
KxxHyoRim committed Feb 29, 2024
1 parent 1bad6cf commit 4a4b551
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import com.google.firebase.ktx.Firebase
import java.time.LocalDateTime
import java.time.format.DateTimeParseException

fun parseDate(createdAt: String?): LocalDateTime? {
fun parseDate(date: String?): LocalDateTime? {
return try {
checkNotNull(createdAt)
LocalDateTime.parse(createdAt)
checkNotNull(date)
LocalDateTime.parse(date)
} catch (e: DateTimeParseException) {
Firebase.crashlytics.log("$e / Wrong Date format : $createdAt")
Firebase.crashlytics.log("$e / Wrong Date format : $date")
null
} catch (e: IllegalStateException) {
Firebase.crashlytics.log("$e / created value might be null : $createdAt")
Firebase.crashlytics.log("$e / created value might be null : $date")
null
}
}

0 comments on commit 4a4b551

Please sign in to comment.