Skip to content

Improved String parsing to time interval

Compare
Choose a tag to compare
@michaelgantman michaelgantman released this 17 Apr 18:29
· 104 commits to master since this release

In this release the feature parsing string to time interval is refactored, improved and streamlined. in addition to supported suffixes of "s", "m" and "h" (for seconds, minutes and hours respectively) suffix "d" for days was added. If the string comes without suffix then the value is considered to be in milliseconds (instead of seconds in previous release which left no way to parse the string in millisecods at all). Also default value parameter is removed and if the parsed string is invalid then IllegalArgumentException is thrown