Skip to content

Commit

Permalink
Merge pull request #164 from ariel-anieli/pr-redundant-parse
Browse files Browse the repository at this point in the history
Removed other redudant clauses in local parse/3
  • Loading branch information
ferd authored Dec 10, 2023
2 parents 4d5811d + ad4b944 commit 7c49117
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/ec_date.erl
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,6 @@ parse([Month,Day,Year,Hour | PAM], _Now, _Opts)
when ?is_meridian(PAM) andalso ?is_hinted_month(Month) andalso ?is_day(Day) ->
{{Year, Month, Day}, {hour(Hour, PAM), 0, 0}};

%% Date/Times Dec 1st, 2012 18:25:15 (no AM/PM)
parse([Month,Day,Year,Hour,$:,Min,$:,Sec], _Now, _Opts)
when ?is_hinted_month(Month) andalso ?is_day(Day) ->
{{Year, Month, Day}, {hour(Hour, []), Min, Sec}};
parse([Month,Day,Year,Hour,$:,Min], _Now, _Opts)
when ?is_hinted_month(Month) andalso ?is_day(Day) ->
{{Year, Month, Day}, {hour(Hour, []), Min, 0}};

%% Date/Times Fri Nov 21 14:55:26 +0000 2014 (Twitter format)
parse([Month, Day, Hour,$:,Min,$:,Sec, Year], _Now, _Opts)
when ?is_hinted_month(Month), ?is_day(Day), ?is_year(Year) ->
Expand Down

0 comments on commit 7c49117

Please sign in to comment.