Source:
public void testTimeUnit() { assertEquals(ms(0, MILLISECONDS), parse("0")); assertEquals(ms(2, MILLISECONDS), parse("2ms")); assertEquals(ms(200, MILLISECONDS), parse("200 milliseconds")); assertEquals(ms(2, SECONDS), parse("2s")); assertEquals(ms(231, SECONDS), parse("231sec")); assertEquals(ms(1, SECONDS), parse("1second")); assertEquals(ms(300, SECONDS), parse("300 seconds")); assertEquals(ms(2, MINUTES), parse("2m")); assertEquals(ms(2, MINUTES), parse("2min")); assertEquals(ms(1, MINUTES), parse("1 minute")); assertEquals(ms(10, MINUTES), parse("10 minutes")); assertEquals(ms(5, HOURS), parse("5h")); assertEquals(ms(5, HOURS), parse("5hr")); assertEquals(ms(1, HOURS), parse("1hour")); assertEquals(ms(48, HOURS), parse("48hours")); assertEquals(ms(5, HOURS), parse("5 h")); assertEquals(ms(5, HOURS), parse("5 hr")); assertEquals(ms(1, HOURS), parse("1 hour")); assertEquals(ms(48, HOURS), parse("48 hours")); assertEquals(ms(48, HOURS), parse("48 \t \r hours")); assertEquals(ms(4, DAYS), parse("4d")); assertEquals(ms(1, DAYS), parse("1day")); assertEquals(ms(14, DAYS), parse("14days")); assertEquals(ms(7, DAYS), parse("1w")); assertEquals(ms(7, DAYS), parse("1week")); assertEquals(ms(14, DAYS), parse("2w")); assertEquals(ms(14, DAYS), parse("2weeks")); assertEquals(ms(30, DAYS), parse("1mon")); assertEquals(ms(30, DAYS), parse("1month")); assertEquals(ms(60, DAYS), parse("2mon")); assertEquals(ms(60, DAYS), parse("2months")); assertEquals(ms(365, DAYS), parse("1y")); assertEquals(ms(365, DAYS), parse("1year")); assertEquals(ms(365 * 2, DAYS), parse("2years")); }

Target:
public void testTimeUnit() { assertEquals(ms(0, MILLISECONDS), parse("0")); assertEquals(ms(2, MILLISECONDS), parse("2ms")); assertEquals(ms(200, MILLISECONDS), parse("200 milliseconds")); assertEquals(ms(0, SECONDS), parse("0s")); assertEquals(ms(2, SECONDS), parse("2s")); assertEquals(ms(231, SECONDS), parse("231sec")); assertEquals(ms(1, SECONDS), parse("1second")); assertEquals(ms(300, SECONDS), parse("300 seconds")); assertEquals(ms(2, MINUTES), parse("2m")); assertEquals(ms(2, MINUTES), parse("2min")); assertEquals(ms(1, MINUTES), parse("1 minute")); assertEquals(ms(10, MINUTES), parse("10 minutes")); assertEquals(ms(5, HOURS), parse("5h")); assertEquals(ms(5, HOURS), parse("5hr")); assertEquals(ms(1, HOURS), parse("1hour")); assertEquals(ms(48, HOURS), parse("48hours")); assertEquals(ms(5, HOURS), parse("5 h")); assertEquals(ms(5, HOURS), parse("5 hr")); assertEquals(ms(1, HOURS), parse("1 hour")); assertEquals(ms(48, HOURS), parse("48 hours")); assertEquals(ms(48, HOURS), parse("48 \t \r hours")); assertEquals(ms(4, DAYS), parse("4d")); assertEquals(ms(1, DAYS), parse("1day")); assertEquals(ms(14, DAYS), parse("14days")); assertEquals(ms(7, DAYS), parse("1w")); assertEquals(ms(7, DAYS), parse("1week")); assertEquals(ms(14, DAYS), parse("2w")); assertEquals(ms(14, DAYS), parse("2weeks")); assertEquals(ms(30, DAYS), parse("1mon")); assertEquals(ms(30, DAYS), parse("1month")); assertEquals(ms(60, DAYS), parse("2mon")); assertEquals(ms(60, DAYS), parse("2months")); assertEquals(ms(365, DAYS), parse("1y")); assertEquals(ms(365, DAYS), parse("1year")); assertEquals(ms(365 * 2, DAYS), parse("2years")); }