@@ -4,7 +4,7 @@ import { DateTime, DateTimeOptions, Duration, DurationLike, Interval, IntervalMa
4
4
import { parse } from "path" ;
5
5
import { DeepReadonly } from "utility-types" ;
6
6
7
- import { assertLuxonFormat , assertValid } from "@/util/luxon-utils" ;
7
+ import { assertValidDateTimeFormat , assertValidLuxonValue } from "@/util/luxon-utils" ;
8
8
9
9
import { DateBasedCollection } from "./schema" ;
10
10
import { stripTrailingSlash } from "./util" ;
@@ -29,16 +29,13 @@ export class PeriodicNotes extends DateBasedCollection implements PeriodicNotesC
29
29
30
30
/**
31
31
* The {@link Duration} of each file's corresponding {@link Interval}.
32
- * @example
33
- * Daily notes should use a duration of `{ days: 1 }`.
32
+ * Daily notes, for example, should use a duration of `{ days: 1 }`.
34
33
*/
35
34
public readonly intervalDuration : Duration < true > ;
36
35
37
36
/**
38
37
* Offset between the file's _parsed_ date and the corresponding {@link Interval}'s _start_ date. May be negative.
39
- * @example
40
- * Sprint notes may use ISO weeks as their {@link dateFormat}, for example: `2025-W10.md`.
41
- * If sprints _actually_ begin on Thursdays rather than Mondays, then we can adjust the interval with `{ days: 3 }`.
38
+ * Sprint notes, for example, can use ISO weeks for {@link dateFormat} and {@link intervalOffset} for their weekday.
42
39
*/
43
40
public readonly intervalOffset : Duration < true > ;
44
41
@@ -125,10 +122,10 @@ function validated(config: PeriodicNotesConfig<false>): PeriodicNotesConfig<true
125
122
126
123
const errors = [
127
124
attempt ( ( ) => assertNotStrictEqual ( folder . length , 0 , "folder must be non-empty" ) ) ,
128
- attempt ( ( ) => assertLuxonFormat ( dateFormat , dateOptions ) ) ,
129
- attempt ( ( ) => assertValid ( intervalDuration , "interval duration is invalid" ) ) ,
125
+ attempt ( ( ) => assertValidDateTimeFormat ( dateFormat , dateOptions ) ) ,
126
+ attempt ( ( ) => assertValidLuxonValue ( intervalDuration , "interval duration is invalid" ) ) ,
130
127
attempt ( ( ) => assertNotStrictEqual ( intervalDuration . valueOf ( ) , 0 , "interval duration must not be zero" ) ) ,
131
- attempt ( ( ) => assertValid ( intervalOffset , "interval offset is invalid" ) ) ,
128
+ attempt ( ( ) => assertValidLuxonValue ( intervalOffset , "interval offset is invalid" ) ) ,
132
129
] . filter ( isError ) ;
133
130
134
131
if ( errors . length > 0 ) {
0 commit comments