Skip to content

2.0.0: Api change

Latest
Compare
Choose a tag to compare
@wapmorgan wapmorgan released this 27 Apr 16:18
· 15 commits to master since this release
  • Now TimeParser is not a static class - you need to create an instance of parser.
    $parser = new wapmorgan\TimeParser\TimeParser('english');
    and then parse any number of strings.
    $datetime = $parser->parse(fgets(STDIN));
  • For one-call parsing there is a static method parseString($string, $languages = 'all', $allowAlphabeticUnits = false, $falseWhenNotChanged = false): DateTimeImmutable.
  • Added tests.