Add initial experiment with between/[2,3]
This commit is contained in:
parent
cc9dee4e08
commit
69967d71ff
1 changed files with 9 additions and 1 deletions
|
@ -40,7 +40,9 @@
|
|||
|
||||
-export([
|
||||
compare/2,
|
||||
compare/3
|
||||
compare/3,
|
||||
between/2,
|
||||
between/3
|
||||
]).
|
||||
|
||||
-export([
|
||||
|
@ -409,6 +411,12 @@ compare(A, Op, B) ->
|
|||
'=>' -> Comp =:= 1 orelse Comp =:= 0
|
||||
end.
|
||||
|
||||
between(A, B) ->
|
||||
between(unixtime(), A, B).
|
||||
|
||||
between(Date, A, B) ->
|
||||
compare(Date, '>=', A) andalso compare(Date, '=<', B).
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Date Math %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue