Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation: Document "fields" (Getter) in README #269

Open
greyscaled opened this issue Jun 3, 2022 · 0 comments
Open

documentation: Document "fields" (Getter) in README #269

greyscaled opened this issue Jun 3, 2022 · 0 comments

Comments

@greyscaled
Copy link

greyscaled commented Jun 3, 2022

User Story 馃懃

Here there 馃憢 馃憢. I was initially evaluating using this library for the following use case:

  • an API sends me a cron string
  • I want to display a form with checkboxes and time inputs

PR here: https://github.com/coder/coder/pull/2006/files

To do this, I needed to parse day-of-week.

When I looked at this npm package/README, I saw that we could do some cool things, but I didn't see any evidence that I could just pull out the information I needed (ie: from the fields property).

It would be great to document fields.

Details

  • fields is a "getter" with the 5 cron-aspects as sub-properties, and gets the parsed cron string in pieces, usually as numbers in an array
  • it would be great to see an example of how to use `fields

I'm happy supplying a PR for this if that's ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants