Fixed that all years of dates were too small by 100 years
This commit is contained in:
parent
2f321faa6a
commit
c50a64f2ee
|
@ -430,7 +430,7 @@ open class Mt940Parser : IMt940Parser {
|
|||
// this really simple date format on my own
|
||||
if (dateString.length == 6) {
|
||||
try {
|
||||
var year = dateString.substring(0, 2).toInt() + 2000
|
||||
var year = dateString.substring(0, 2).toInt()
|
||||
val month = dateString.substring(2, 4).toInt()
|
||||
val day = dateString.substring(4, 6).toInt()
|
||||
|
||||
|
@ -438,7 +438,7 @@ open class Mt940Parser : IMt940Parser {
|
|||
year -= 100
|
||||
}
|
||||
|
||||
return Date(year, month, day) // java.util.Date years start at 1900 at month at 0 not at 1
|
||||
return Date(year + 2000, month, day) // java.util.Date years start at 1900 at month at 0 not at 1
|
||||
} catch (e: Exception) {
|
||||
log.error(e) { "Could not parse dateString '$dateString'" }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue