Compare commits
2
Commits
63c80f0bae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aeeabe81c7 | ||
|
|
87eff715f6 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tout-doux",
|
||||
"version": "1.7.5",
|
||||
"version": "1.7.6",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"engines": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "tout-doux"
|
||||
version = "1.7.5"
|
||||
version = "1.7.6"
|
||||
description = ""
|
||||
requires-python = ">=3.14"
|
||||
dependencies = [
|
||||
|
||||
@@ -22,7 +22,7 @@ export function parseCron(cron: string | null): {
|
||||
value: 0,
|
||||
date: null,
|
||||
};
|
||||
} else if (cron.startsWith("RRULE:") || cron.startsWith("DTSTART:")) {
|
||||
} else if (isRrule(cron)) {
|
||||
return parseRrule(cron);
|
||||
} else if ((value = /^0 (\d+) \* \* \*$/i.exec(cron)) !== null) {
|
||||
return {
|
||||
@@ -75,6 +75,10 @@ export function parseCron(cron: string | null): {
|
||||
}
|
||||
}
|
||||
|
||||
function isRrule(cron: string): boolean {
|
||||
return cron.startsWith("RRULE:") || cron.startsWith("DTSTART:");
|
||||
}
|
||||
|
||||
export function parseRrule(rule: string): {
|
||||
type: CronType;
|
||||
value: number;
|
||||
@@ -193,7 +197,7 @@ export function nextCronReset(
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
if (cron.startsWith("RRULE:")) {
|
||||
if (isRrule(cron)) {
|
||||
try {
|
||||
const rule = new RRule({
|
||||
...RRule.parseString(cron),
|
||||
|
||||
Reference in New Issue
Block a user