Skip to content

Commit

Permalink
Fix issue 3252 (#3262)
Browse files Browse the repository at this point in the history
* Fix issue 3252

* Fix conflict
  • Loading branch information
mahmoodharis88 committed Jul 1, 2024
1 parent 6925f8f commit 71a3b41
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.ivy.importdata.csv.DateMetadata
import com.ivy.importdata.csv.TrnTypeMetadata
import java.text.DecimalFormat
import java.text.NumberFormat
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.time.format.DateTimeParseException
Expand Down Expand Up @@ -111,6 +112,12 @@ fun parseDate(
return@tryParse LocalDateTime.parse(cleanedValue, DateTimeFormatter.ofPattern(format))
} catch (e: DateTimeParseException) {
// Ignore and continue trying other formats
try {
return@tryParse LocalDate.parse(cleanedValue, DateTimeFormatter.ofPattern(format))
.atStartOfDay()
} catch (e: DateTimeParseException) {
// Ignore and continue trying other formats
}
}
}
null
Expand Down

0 comments on commit 71a3b41

Please sign in to comment.