cronexp.utils

This module contains some utils usefull for cron parser

Members

Functions

bitClear
void bitClear(ref T num, ubyte idx)

Set idx-th bit in var to 0

bitSet
void bitSet(ref T num, ubyte idx)

Set idx-th bit in var to 1

bitTest
bool bitTest(T num, ubyte idx)

Get idx-th bit in var

dow
ubyte dow(DateTime dt)

Convert std.datetime.DayOfWeek enum to dow index

parseAny
void parseAny(ref T val, ubyte from, ubyte until)

Fill all allowed indexes to var

parseList
void parseList(ref T val, R expr)

Parse list of indexes to var (eg. "1,2,3,5,8")

parseRange
void parseRange(ref T val, R expr, ubyte from, ubyte until)

Parse range of indexes to var (eg. "2-4" or "5-1")

parseSequence
void parseSequence(ref T val, R expr, ubyte from, ubyte until)

Parse sequence of indexes to var (eg. "a/x" == "a, a+x, a+2x, ...")

Meta

Authors

Maxim Tyapkin

License

This software is licensed under the terms of the BSD 3-clause license. The full terms of the license can be found in the LICENSE.md file.