Fast and tiny JavaScript/TypeScript cron parser with timezone support
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix expected .describe cases

+5 -5
+1 -1
jsr.json
··· 1 1 { 2 2 "name": "@kbilkis/cron-fast", 3 - "version": "0.2.0", 3 + "version": "0.2.1", 4 4 "description": "Fast and tiny JavaScript/TypeScript cron parser with timezone support - works in Node.js, Deno, Bun, Cloudflare Workers, and browsers. Zero dependencies.", 5 5 "keywords": [ 6 6 "javascript",
+1 -1
package.json
··· 1 1 { 2 2 "name": "cron-fast", 3 - "version": "0.2.0", 3 + "version": "0.2.1", 4 4 "description": "Fast and tiny JavaScript/TypeScript cron parser with timezone support - works in Node.js, Deno, Bun, Cloudflare Workers, and browsers. Zero dependencies.", 5 5 "keywords": [ 6 6 "browser",
+3 -3
test/describe.test.ts
··· 181 181 182 182 // Very specific: multiple minutes, hours, days, months, and weekdays 183 183 expect(describeCron("5,10,15,20 6,12,18 1,15 1,4,7,10 1,3,5")).toBe( 184 - "At minutes 5, 10, 15, 20, at 6 AM, 12 PM, 6 PM, on days 1, 15 of the month or on Monday, Wednesday, Friday, in January, April, July, October", 184 + "At minutes 5, 10, 15, and 1 more, at 6 AM, 12 PM, 6 PM, on days 1, 15 of the month or on Monday, Wednesday, Friday, every 3 months", 185 185 ); 186 186 187 187 // Long range with specific weekdays ··· 191 191 192 192 // Multiple ranges and lists combined 193 193 expect(describeCron("0,30 6-8,14-16,20-22 * * *")).toBe( 194 - "At minutes 0, 30, at 6 AM, 7 AM, 8 AM, 2 PM, 3 PM, and 4 more", 194 + "Every 30 minutes, at 6 AM, 7 AM, 8 AM, 2 PM, 3 PM, and 4 more", 195 195 ); 196 196 197 197 // Extreme: many specific values across all fields 198 198 expect(describeCron("1,2,3,4,5 7,8,9,10,11 2,4,6,8,10 2,5,8,11 0,6")).toBe( 199 - "At minutes 1, 2, 3, and 2 more, at 7 AM, 8 AM, 9 AM, 10 AM, 11 AM, on days 2, 4, 6, and 2 more of the month or on weekends, in February, May, August, November", 199 + "At minutes 1-5, between 7 AM and 11 AM, on days 2, 4, 6, and 2 more of the month or on weekends, in February, May, August, November", 200 200 ); 201 201 }); 202 202 });