diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-06-07 11:42:46 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-06-07 11:42:46 +0200 |
commit | 20030e38a921d2ba00ba7b67d0e466aafd591b4d (patch) | |
tree | a7d50b0882b724c3fc0611f671127823a1cd35ff /protocol.d.ts | |
parent | bce701919dad8fb3ce0e06ada4d4892240d483e2 (diff) | |
download | karlender-20030e38a921d2ba00ba7b67d0e466aafd591b4d.tar karlender-20030e38a921d2ba00ba7b67d0e466aafd591b4d.tar.bz2 karlender-20030e38a921d2ba00ba7b67d0e466aafd591b4d.tar.zst |
a
Diffstat (limited to 'protocol.d.ts')
-rw-r--r-- | protocol.d.ts | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/protocol.d.ts b/protocol.d.ts index 36bf3e1..0657cdf 100644 --- a/protocol.d.ts +++ b/protocol.d.ts @@ -36,32 +36,34 @@ interface Task { deadline?: Condition, } -/* - { and: [ - { or: [{ dayofweak: 0 }, { dayofweak: 1 }] }, - { weekofmonth: 0 } - { hour: [11, 13] } - ]} +/* + 11:00 - 12:00 every first monday of the month + + and: [ + range: {prop: "hour", min: 11, max: 12}, + equal: {prop: "dayofweek", value: 0}, + equal: {prop: "weekofmonth", value: 0}, + ] */ // should only have one property interface Condition { from: Condition - to: Condition or: Condition[] and: Condition[] - year?: [number, number], - monthofyear?: [number, number], - weekofmonth?: [number, number], - dayofyear?: [number, number], - dayofmonth?: [number, number], - dayofweek?: [number, number], - - hour?: [number, number], - minute?: [number, number], - second?: [number, number], - - unix?: [number, number], + equal?: { prop: Thing, value: number, mod?: number } + range?: { prop: Thing, min: number, max: number, mod?: number } } + +type Thing = "year" + | "monthofyear" + | "weekofmonth" + | "dayofyear" + | "dayofmonth" + | "dayofweek" + | "hour" + | "minute" + | "second" + | "unix"
\ No newline at end of file |