mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Fixes an off-by-one classic to also accept dates in January
This commit is contained in:
parent
6c7f0cc4f7
commit
e9347176bd
@ -76,7 +76,7 @@ object DateFind {
|
|||||||
|
|
||||||
def readMonth: Reader[Int] =
|
def readMonth: Reader[Int] =
|
||||||
Reader.readFirst(w =>
|
Reader.readFirst(w =>
|
||||||
Some(months.indexWhere(_.contains(w.value))).filter(_ > 0).map(_ + 1)
|
Some(months.indexWhere(_.contains(w.value))).filter(_ >= 0).map(_ + 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
def readDay: Reader[Int] =
|
def readDay: Reader[Int] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user