Allow parsing of more flexible interval strings including long names (day, hour, minute, second, millisecond), negative values, no spaces between components, and throwing exceptions on invalid input if requested. The following types are now allowed - d|day|days - h|hour|hours - m|min|mins|minute|minutes - s|sec|secs|second|seconds - ms|msec|msecs|msecond|mseconds|millis|millisec|millisecs|millisecond|milliseconds Also fix the milisecond parsing that was done completly wrong the milliseoncds where just added after a "." as decimals without converting them at all. Now the value is divided by 1000 and added to the existing number, and as before only if ms exist The negative check is now included in the main parse regex, so a second regex check is no longer necessary Spaces between values, before or anywhere are now more flexible. Exceptions are thrown if the regex cannot parse anything, or it returns only one master entry and no matches
20 KiB
20 KiB