mirror of
https://github.com/hmalik144/Driver.git
synced 2025-12-10 02:45:20 +00:00
- test fix
This commit is contained in:
@@ -16,7 +16,7 @@ class DateDialog(
|
||||
|
||||
private val dateSetListener: OnDateSetListener =
|
||||
OnDateSetListener { _, year, month, dayOfMonth ->
|
||||
val date = DateUtils.getDateString(year, month, dayOfMonth)
|
||||
val date = DateUtils.getDateString(year, month + 1, dayOfMonth)
|
||||
dateSelected(date)
|
||||
editText.setText(date)
|
||||
editText.error = null
|
||||
|
||||
@@ -41,7 +41,7 @@ object DateUtils {
|
||||
fun getDateString(year: Int, month: Int, dayOfMonth: Int): String {
|
||||
val date = LocalDate.now()
|
||||
.withYear(year)
|
||||
.withMonthOfYear(month + 1)
|
||||
.withMonthOfYear(month)
|
||||
.withDayOfMonth(dayOfMonth)
|
||||
return date.toString(GLOBAL_FORMAT)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user