anchor.diff:  	diff({YMD1,{H1+24,I1,S1}},NextDate2);
   diff({{Y1,M1,D1},T1}, {{Y2,M2,D2},_} = Date2) when D2 > D1 ->
   	NextDate2 = next_month(Date2),
  -	diff({{Y1,M1,D1+last_day_of_month(Y2,M2)},T1},NextDate2);
  +	diff({{Y1,M1,D1+calendar:last_day_of_the_month(Y2,M2)},T1},NextDate2);
   diff({{Y1,M1,D1},T1}, {{_,M2,_},_} = Date2) when M2 > M1 ->
   	NextDate2 = next_year(Date2),
   	diff({{Y1,M1+12,D1},T1},NextDate2);
  
positive.code: %% @doc Return the date one day earlier.
  prev_day({{_,_,1},_} = Date) ->
  	{{Y1,M1,_},T1} = prev_month(Date),
  	{{Y1,M1,last_day_of_month(Y1,M1)}, T1};
  prev_day({{Y,M,D},T}) ->
  	{{Y,M,D-1}, T};
  prev_day({_,_,_} = Date) ->
  
negative.code: 	{YMD,{H,I,0}};
  next_second({YMD,{H,I,S}}) ->
  	{YMD, {H,I,S+1}}.
  
  %% @doc Return the number of days in a certain year.
  days_in_year(Y) ->
  