dev-master
9999999-devSupport calculations on day ranges (e.g. 1-2, 4, ...)
MIT
The Development Requires
by gregor tramsak
v1.0.0
1.0.0.0Support calculations on day ranges (e.g. 1-2, 4, ...)
MIT
The Development Requires
by gregor tramsak
Wallogit.com
2017 © Pedro Peláez
Support calculations on day ranges (e.g. 1-2, 4, ...)
Generate and modify number ranges in a string format., (*1)
Please see tests for some examples. Here are a few., (*2)
NumberRangeString::fromRange('1-5')->moveBy(2) // 3-7
NumberRangeString::fromRange('1-20')->expand(new NumberRangeString('5-21')) // 1-21
NumberRangeString::fromRange('1-2')->countInclusive() // 2
NumberRangeString::fromRange('1-2')->countExclusive() // 0
NumberRangeString::fromRange('1-2')->countNumeric() // 1
NumberRangeString::fromRange('1-1')->countNumeric() // 0
NumberRangeString::fromRange('-5--1')->moveTo(1) // 1-5
new NumberRangeString([5,10, ' to ']) // 5 to 10
NumberRangeString::fromRange([5,10, ' to '])->add(1) // 6 to 11
Support calculations on day ranges (e.g. 1-2, 4, ...)
MIT
Support calculations on day ranges (e.g. 1-2, 4, ...)
MIT