aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_date.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-07-10 12:58:12 +0200
committerLoïc Hoguin <[email protected]>2017-07-10 12:58:12 +0200
commit2cf430f404771255feead27873e48542829ea185 (patch)
tree1b6e6ed9a223064158031fb64db35e0498e64b97 /src/cow_date.erl
parent93d68bcccc118ef1b72622efc95f9fde5252c3ff (diff)
downloadcowlib-2cf430f404771255feead27873e48542829ea185.tar.gz
cowlib-2cf430f404771255feead27873e48542829ea185.tar.bz2
cowlib-2cf430f404771255feead27873e48542829ea185.zip
Switch from Triq to Proper
Diffstat (limited to 'src/cow_date.erl')
-rw-r--r--src/cow_date.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cow_date.erl b/src/cow_date.erl
index 803448b..c0710f8 100644
--- a/src/cow_date.erl
+++ b/src/cow_date.erl
@@ -20,7 +20,7 @@
-export([rfc7231/1]).
-ifdef(TEST).
--include_lib("triq/include/triq.hrl").
+-include_lib("proper/include/proper.hrl").
-endif.
%% @doc Parse the HTTP date (IMF-fixdate, rfc850, asctime).
@@ -143,12 +143,12 @@ asctime_day(D1, D2) -> (D1 - $0) * 10 + (D2 - $0).
-ifdef(TEST).
day_name() -> oneof(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]).
day_name_l() -> oneof(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]).
-year() -> int(1951, 2050).
-month() -> int(1, 12).
-day() -> int(1, 31).
-hour() -> int(23).
-minute() -> int(59).
-second() -> int(60).
+year() -> integer(1951, 2050).
+month() -> integer(1, 12).
+day() -> integer(1, 31).
+hour() -> integer(0, 23).
+minute() -> integer(0, 59).
+second() -> integer(0, 60).
fixdate_gen() ->
?LET({DayName, Y, Mo, D, H, Mi, S},