anchor.diff:  -define(int32, 1/big-signed-unit:32).
   
   -define(postgres_epoc_jdate, 2451545).
  +-define(postgres_epoc_secs, 946684800).
   
   -define(mins_per_hour, 60).
   -define(secs_per_day, 86400.0).
  
positive.code:     D = date2j(Date) - ?postgres_epoc_jdate,
      D * ?secs_per_day + time2f(Time).
  
  tmodulo(T, U) ->
      case T < 0 of
          true  -> Q = ceiling(T / U);
  
negative.code: encode(date, D)         -> <<4:?int32, (date2j(D) - ?postgres_epoc_jdate):1/big-signed-unit:32>>;
  encode(time, T)         -> <<8:?int32, (time2f(T)):1/big-float-unit:64>>;
  encode(timetz, {T, TZ}) -> <<12:?int32, (time2f(T)):1/big-float-unit:64, TZ:?int32>>;
  encode(timestamp, TS = {_, _, _})   -> <<8:?int32, (now2f(TS)):1/big-float-unit:64>>;
  encode(timestamp, TS)   -> <<8:?int32, (timestamp2f(TS)):1/big-float-unit:64>>;
  encode(timestamptz, TS = {_, _, _})   -> <<8:?int32, (now2f(TS)):1/big-float-unit:64>>;
  encode(timestamptz, TS) -> <<8:?int32, (timestamp2f(TS)):1/big-float-unit:64>>;
  encode(interval, {T, D, M}) -> <<16:?int32, (time2f(T)):1/big-float-unit:64, D:?int32, M:?int32>>.
  
  