Much cleaner, but not working, because I have a circular loop

This commit is contained in:
lsowen
2012-12-04 21:36:44 -05:00
parent 676e112600
commit 4f3364a76d
10 changed files with 353 additions and 371 deletions

View File

@@ -58,7 +58,7 @@ years(#rule{from=From, to=To}) ->
%% calculation stops after a fixed year, configurable above.
years_after(Y, {F,M}) when M=:=max; M=:=maximum ->
{erlang:max(Y,F), M};
years_after(Y, {From, To}) when Y > To ->
years_after(Y, {_From, To}) when Y > To ->
none;
years_after(Y, {From, To}) ->
{erlang:max(Y,From), To}.