Parse Twitter-style dates

This commit is contained in:
Brian Lee Yung Rowe 2014-12-02 17:04:08 -05:00
parent ae608d26e1
commit 441d11820d
2 changed files with 15 additions and 2 deletions

View file

@ -17,7 +17,7 @@
file(Filename) -> case file:read_file(Filename) of {ok,Bin} -> parse(Bin); Err -> Err end.
-spec parse(binary() | list()) -> any().
parse(List) when is_list(List) -> parse(list_to_binary(List));
parse(List) when is_list(List) -> parse(unicode:characters_to_binary(List));
parse(Input) when is_binary(Input) ->
_ = setup_memo(),
Result = case 'semver'(Input,{{line,1},{column,1}}) of