separated out rule and date logic. WIP: flattening the data, absolute from fuzzy dates, comparing dates

This commit is contained in:
aj
2010-11-03 23:33:06 -07:00
parent 188f31d543
commit e9d247784e
13 changed files with 401 additions and 61 deletions

13
src/ezic_rule.erl Normal file
View File

@@ -0,0 +1,13 @@
-module(ezic_rule).
-include("include/ezic.hrl").
-export([]).
% returns a list of all {datetime,offset} sets that must be
% projected for this Rule.
project(Rule=#rule{from=F, to=only}) ->
not_done;
project(Rule=#rule{from=F, to=T}) ->
Dates= lists:map(fun(Y)-> ezic_date:for(Rule, Y) end, lists:seq(F, T)).