refactor: remove unnecessary comment from getDateFromText()

This commit is contained in:
kolaente
2026-02-06 10:09:32 +01:00
parent 61448bb028
commit cee258edc3

View File

@@ -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]))',