GithubHelp home page GithubHelp logo

Document Weekday Ordinals about cron HOT 3 OPEN

zslayton avatar zslayton commented on September 18, 2024 2
Document Weekday Ordinals

from cron.

Comments (3)

sbditto85 avatar sbditto85 commented on September 18, 2024

I would argue that it should be changed to be 0-6 or have a configuration to pick between 0-6 or 1-7 as right now if we wanted to use this crate we'd need to fork it and change it to 0-6. Otherwise, the crate looks great!

from cron.

zslayton avatar zslayton commented on September 18, 2024

See also: #37. Sunday=1 was taken from the Quartz service.

Maybe this should be documented somewhere.

+1.

I would argue that it should be changed to be 0-6

I can't do this as there are folks using it for parsing Quartz's flavor of cron expressions.

or have a configuration to pick between 0-6 or 1-7

This would be great! There are other settings that would be nice to have, too. Off the top of my head:

  • Named ordinal support for other languages (Mon,Tues,Wed in English -> Lun,Mar,Mer in French)
  • Some locales start the week on Monday, not Sunday.
  • 5-field expressions in which the leftmost field is meant to be a year instead of the rightmost being seconds.

I'd like to have a builder API that lets folks opt into these settings. Exposing a day-of-week ordinals option would be a good place to start. If anyone is interested in implementing that, let me know and we can sketch out what the API should look like.

from cron.

hce avatar hce commented on September 18, 2024

Hello, I'd also like to say this is a great crate! :-)
I'm also here because of the weekday numbering scheme; I was expecting a standard unix scheme where 0 and 7 means sunday, while 1 means monday, etc. It would be great if this behavior could be enabled by some option.

from cron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.