cronrange alternatives and similar packages
Based on the "Date and Time" category.
Alternatively, view cronrange alternatives based on common mentions on social networks and blogs.
-
dateparse
GoLang Parse many date strings without knowing format in advance. -
go-sunrise
Go package for calculating the sunrise and sunset times for a given location -
strftime
C99-compatible strftime formatter for use with Go time.Time instances. -
go-anytime
Parse natural and standardized dates/times and ranges in Go without knowing the format in advance -
approx
Package approx adds support for durations of days, weeks and years.
Collect and Analyze Billions of Data Points in Real Time
Do you think we are missing an alternative of cronrange or a related project?
README
cronrange
cronrange is a Go package for time range expression in Cron style.
In a nutshell, CronRange expression is a combination of Cron expression and time duration to represent periodic time ranges, i.e. Cron for Time*Range*. And it made easier to tell if the moment falls within the any time ranges (use IsWithin() method), and what's the next occurrence (use NextOccurrences() method).
For example, every New Year's Day in Tokyo can be written as:
DR=1440; TZ=Asia/Tokyo; 0 0 1 1 *
It consists of three parts separated by a semicolon:
-
DR=1440
stands for duration in minutes, 60 * 24 = 1440 min; -
TZ=Asia/Tokyo
is optional and for time zone using name in IANA Time Zone database; -
0 0 1 1 *
is a cron expression representing the beginning of the time range.
Installation
To download the package:
go get -u github.com/1set/cronrange
Usage
To import it in your program as:
import "github.com/1set/cronrange"
Examples can be found in GoDoc.
License
*Note that all licence references and agreements mentioned in the cronrange README section above
are relevant to that project's source code only.