Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Expose ParseStrict to error on too many fields #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Aug 1, 2018

  1. Expose ParseStrict to error on too many fields

    Parse currently ignores any tokens after the 7th, which means invalid
    cron expressions might be allowed as long as invalid tokens are found
    after the 7th character.
    
    In some use cases (e.g. validating cron expressions provided by a user),
    this might not be desirable. To allow for this use case, this adds a
    ParseStrict function that returns an error if too many fields are
    provided (it retains backwards compatibility by not touching Parse).
    krallin committed Aug 1, 2018
    Configuration menu
    Copy the full SHA
    b648cc9 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2020

  1. Set up go modules

    krallin committed Nov 14, 2020
    Configuration menu
    Copy the full SHA
    ee361fc View commit details
    Browse the repository at this point in the history
  2. Reject intervals that are out of order

    If an interval if out of order, it ends up emitting 0000-00-00 00:00:00
    as the "next" time, which is undesirable. This patch updates Parse to
    simply reject such intervals.
    
    Since the rejection reason might not be super obvious (the range 6-7 is
    actually translated to 6-0, which makes it invalid), let's also print
    the original vs. normalized form for clarity.
    
    See: aptible/supercronic#63
    krallin committed Nov 14, 2020
    Configuration menu
    Copy the full SHA
    cff9279 View commit details
    Browse the repository at this point in the history
  3. Update import paths to krallin/cronexpr

    This fork is to support Supercronic, and that's how it's imported there.
    krallin committed Nov 14, 2020
    Configuration menu
    Copy the full SHA
    0373391 View commit details
    Browse the repository at this point in the history