anchor.diff:      day_add(prev_day(Date), Num + 1);
   day_add(Date, Num) when Num > 0 ->
       day_add(next_day(Date), Num - 1).
  +
  +
  +
  +%% @doc Translate UNIX timestamp to local datetime.
  +timestamp_to_datetime(Seconds) ->
  +   BaseDate = calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}}),
  +   calendar:universal_time_to_local_time(calendar:gregorian_seconds_to_datetime(BaseDate + Seconds)).
  +
  +
  +%% @doc Translate a date to UNIX timestamp
  +datetime_to_timestamp(?ST_JUTTEMIS) ->
  +    undefined;
  +datetime_to_timestamp(undefined) ->
  +    undefined;
  +datetime_to_timestamp(DT) ->
  +    BaseDate = calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}}),
  +    calendar:datetime_to_gregorian_seconds(hd(calendar:local_time_to_universal_time_dst(DT))) - BaseDate.
  
positive.code: -export([
      timesince/2,
  	timesince/3,
  	 timesince/4,
  	
  	days_in_year/1,
  	
  
negative.code: 
      month_boundaries/1,
      week_boundaries/1,
      week_boundaries/2,
      
      timestamp_to_datetime/1,
      datetime_to_timestamp/1
  ]).
  
  
  