-
-
Notifications
You must be signed in to change notification settings - Fork 324
add Cron.serialize
#4991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next-minor
Are you sure you want to change the base?
add Cron.serialize
#4991
Conversation
🦋 Changeset detectedLatest commit: c950aa3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
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 |
* @since 3.16.4 | ||
* @category serialization / deserialization | ||
*/ | ||
export const serialize = (cron: Cron, options?: SerializeOptions): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just inline the options, so it is easier to see at a glance.
Also not sure what to do about time zones :) |
31a655a
to
e7a8e68
Compare
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 |
d300501
to
aa74683
Compare
f201e29
to
c7d2dcb
Compare
Type
Description
Add a
Cron.serialize
method to convert aCron
instance back into a cron string. It is opinionated as to create the most compact cron string possible.