a string containing an integer and the first leter of a time unit. The supported units are minutes, hours and days.
true, if the string is a valid interval
Test.test!("==")(isTimeInterval(""), false); Test.test!("==")(isTimeInterval("1s"), true); Test.test!("==")(isTimeInterval("1m"), true); Test.test!("==")(isTimeInterval("2m"), true); Test.test!("==")(isTimeInterval("1h"), true); Test.test!("==")(isTimeInterval("2h"), true); Test.test!("==")(isTimeInterval("1d"), true); Test.test!("==")(isTimeInterval("2d"), true); Test.test!("==")(isTimeInterval("1x"), false); Test.test!("==")(isTimeInterval("2xm"), false);
Checks if a string can be converted to a time interval