aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cow_date.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cow_date.erl b/src/cow_date.erl
index bb39c2b..1e54090 100644
--- a/src/cow_date.erl
+++ b/src/cow_date.erl
@@ -26,6 +26,7 @@
-define(DIGITS(A, B), ((A - $0) * 10 + (B - $0))).
-define(DIGITS(A, B, C, D), ((A - $0) * 1000 + (B - $0) * 100 + (C - $0) * 10 + (D - $0))).
+-spec parse_date(binary()) -> calendar:datetime().
parse_date(DateBin) ->
Date = {{_, _, D}, {H, M, S}} = http_date(DateBin),
true = D >= 0 andalso D =< 31,