diff options
author | Loïc Hoguin <[email protected]> | 2014-12-26 12:54:55 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-12-26 12:54:55 +0100 |
commit | 48d164a0c97f91d4db7e37b5c55d937cc0e337cd (patch) | |
tree | 94880cc1e5b038f0553a4b51d08e82a755c97b36 /src/cow_date.erl | |
parent | a3ccda57bcea0cfb23dd9229ca71672dcaca25a0 (diff) | |
download | cowlib-48d164a0c97f91d4db7e37b5c55d937cc0e337cd.tar.gz cowlib-48d164a0c97f91d4db7e37b5c55d937cc0e337cd.tar.bz2 cowlib-48d164a0c97f91d4db7e37b5c55d937cc0e337cd.zip |
Add specs to cow_date:parse_date/1
Diffstat (limited to 'src/cow_date.erl')
-rw-r--r-- | src/cow_date.erl | 1 |
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, |