add `Cron.serialize`
Type
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
Description
Add a Cron.serialize method to convert a Cron instance back into a cron string. It is opinionated as to create the most compact cron string possible.
🦋 Changeset detected
Latest commit: c950aa3fb3353e7c43c9ba3c467cc274b7578566
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 33 packages
| Name | Type |
|---|---|
| effect | Minor |
| @effect/cli | Major |
| @effect/cluster | Major |
| @effect/experimental | Major |
| @effect/opentelemetry | Major |
| @effect/platform-browser | Major |
| @effect/platform-bun | Major |
| @effect/platform-node-shared | Major |
| @effect/platform-node | Major |
| @effect/platform | Major |
| @effect/printer-ansi | Major |
| @effect/printer | Major |
| @effect/rpc | Major |
| @effect/sql-clickhouse | Major |
| @effect/sql-d1 | Major |
| @effect/sql-drizzle | Major |
| @effect/sql-kysely | Major |
| @effect/sql-libsql | Major |
| @effect/sql-mssql | Major |
| @effect/sql-mysql2 | Major |
| @effect/sql-pg | Major |
| @effect/sql-sqlite-bun | Major |
| @effect/sql-sqlite-do | Major |
| @effect/sql-sqlite-node | Major |
| @effect/sql-sqlite-react-native | Major |
| @effect/sql-sqlite-wasm | Major |
| @effect/sql | Major |
| @effect/typeclass | Major |
| @effect/vitest | Major |
| @effect/workflow | Major |
| @effect/ai | Major |
| @effect/ai-anthropic | Major |
| @effect/ai-openai | Major |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Also not sure what to do about time zones :)
Also not sure what to do about time zones :)
Yeah. The time zone needs to be part of it. Probably in the same way as for an ISO date string.
I also wonder whether "includeSeconds" should not be an option but instead be a property on the Cron instance that tracks whether it was created with 5 or 6 segments.