Skip to content

Commit

Permalink
fix invalid convert LocalDate to Calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
piruin authored and porntipa committed Dec 27, 2018
1 parent ac90b91 commit dff3de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffc/src/main/kotlin/ffc/app/util/datetime/Calendar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ fun Calendar.toLocalDate(): LocalDate? {

fun LocalDate.toCalendar(): Calendar {
return Calendar.getInstance().apply {
set(year, monthOfYear, dayOfMonth)
set(year, monthOfYear - 1, dayOfMonth)
}
}

0 comments on commit dff3de2

Please sign in to comment.