X.P.OrgMode: Include 00:xx and xx:00 in the date range

This commit is contained in:
Tony Zorman 2022-11-10 11:10:09 +01:00
parent 8b4560dc1e
commit b627306772

View File

@ -533,12 +533,12 @@ pPriority = option NoPriority $
pTimeOfDay :: Parser (Maybe TimeOfDay) pTimeOfDay :: Parser (Maybe TimeOfDay)
pTimeOfDay = option Nothing $ pTimeOfDay = option Nothing $
skipSpaces *> choice skipSpaces *> choice
[ Just <$> (TimeOfDay <$> pHour <* string ":" <*> pMinute) -- HH:MM [ Just <$> (TimeOfDay <$> pHour <* ":" <*> pMinute) -- HH:MM
, Just <$> (TimeOfDay <$> pHour <*> pure 0 ) -- HH , Just <$> (TimeOfDay <$> pHour <*> pure 0 ) -- HH
] ]
where where
pMinute :: Parser Int = pNumBetween 1 60 pMinute :: Parser Int = pNumBetween 0 59
pHour :: Parser Int = pNumBetween 1 24 pHour :: Parser Int = pNumBetween 0 23
-- | Parse a 'Date'. -- | Parse a 'Date'.
pDate :: Parser Date pDate :: Parser Date