a string containing an integer and the first leter of a time unit. The supported units are minutes, hours and days.
The interval in seconds
Test.test!("==")(parseTimeInterval("1s"), 1); Test.test!("==")(parseTimeInterval("1m"), 60); Test.test!("==")(parseTimeInterval("2m"), 120); Test.test!("==")(parseTimeInterval("1h"), 3_600); Test.test!("==")(parseTimeInterval("2h"), 7_200); Test.test!("==")(parseTimeInterval("1d"), 3600 * 24); Test.test!("==")(parseTimeInterval("2d"), 3600 * 48); Test.testThrown!(Exception)(parseTimeInterval(""), false); Test.testThrown!(Exception)(parseTimeInterval("0s"), false); Test.testThrown!(Exception)(parseTimeInterval("2x"), false); Test.testThrown!(Exception)(parseTimeInterval("1xm"), false);
Converts a string to seconds