* Numerics a note's directory + title expose, used only to bound the set of * candidate dates we round-trip. Tokens we cannot reverse cheaply (localized * month/weekday names) contribute nothing here — the round-trip below verifies * them instead, so the locale never has to be parsed backwards.
( pattern: DateNotePatternSettings, subpath: string, title: string, defaultTitlePattern: string )
| 958 | * them instead, so the locale never has to be parsed backwards. |
| 959 | */ |
| 960 | function patternNumerics( |
| 961 | pattern: DateNotePatternSettings, |
| 962 | subpath: string, |
| 963 | title: string, |
| 964 | defaultTitlePattern: string |
| 965 | ): DateNotePatternMatch | null { |
| 966 | const directoryMatch = matchDirectoryPattern(pattern.directory, subpath) |
| 967 | const titleMatch = matchDateNotePattern(pattern.titlePattern ?? defaultTitlePattern, title) |
| 968 | if (!directoryMatch || !titleMatch) return null |
| 969 | const merged: DateNotePatternMatch = {} |
| 970 | if (!mergePatternMatch(merged, directoryMatch) || !mergePatternMatch(merged, titleMatch)) { |
| 971 | return null |
| 972 | } |
| 973 | return merged |
| 974 | } |
| 975 | |
| 976 | /** |
| 977 | * Every calendar day consistent with the extracted numerics. A day-of-month |
no test coverage detected