mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-11 17:48:44 -05:00
refactor: remove unnecessary comment from getDateFromText()
This commit is contained in:
@@ -163,8 +163,6 @@ const addTimeToDate = (text: string, date: Date, previousMatch: string | null):
|
||||
}
|
||||
|
||||
export const getDateFromText = (text: string, now: Date = new Date()) => {
|
||||
// Each entry is the inner date pattern (the part between the boundary anchors).
|
||||
// Original regexes were: /(^| )(?<found>PATTERN)($| )/gi
|
||||
const datePatterns: string[] = [
|
||||
'(?<found>(?<month>[0-9][0-9]?)\\/(?<day>[0-9][0-9]?)(\\/(?<year>[0-9][0-9]([0-9][0-9])?))?)',
|
||||
'(?<found>(?<year>[0-9][0-9][0-9][0-9]?)\\/(?<month>[0-9][0-9]?)\\/(?<day>[0-9][0-9]))',
|
||||
|
||||
Reference in New Issue
Block a user