( subpath: string, title: string, settings: VaultSettings, pattern: DateNotePatternSettings )
| 1036 | } |
| 1037 | |
| 1038 | function matchWeeklyPattern( |
| 1039 | subpath: string, |
| 1040 | title: string, |
| 1041 | settings: VaultSettings, |
| 1042 | pattern: DateNotePatternSettings |
| 1043 | ): Date | null { |
| 1044 | const numerics = patternNumerics(pattern, subpath, title, DEFAULT_WEEKLY_NOTE_TITLE_PATTERN) |
| 1045 | if (!numerics) return null |
| 1046 | for (const candidate of weeklyCandidateMondays(numerics)) { |
| 1047 | const expected = weeklyNoteLocationForPattern(candidate, settings, pattern) |
| 1048 | if (expected.subpath === subpath && expected.title === title) return candidate |
| 1049 | } |
| 1050 | return null |
| 1051 | } |
| 1052 | |
| 1053 | /** |
| 1054 | * Classify a note as a daily or weekly note, or `null` if it is neither. |
no test coverage detected