anchor.diff:  %% @doc Helper function similar to format/3.
   %%      @equiv format(Format, Datetime, datetime)
   %% @end
  --spec format_datetime(format(), ?c:datetime()) -> {ok, binary()}
  +-spec format_datetime(format(), calendar:datetime()) -> {ok, binary()}
                                                   | {error, invalid_time}.
   format_datetime(Format, Datetime) ->
  -    Timestamp = ?c:datetime_to_gregorian_seconds(Datetime) - ?EPOCH_ZERO,
  +    Timestamp = calendar:datetime_to_gregorian_seconds(Datetime) - ?EPOCH_ZERO,
       format_unix(Format, Timestamp).
   
   %% @private
  
positive.code: 
  -module(tempo).
  -on_load(nif_init/0).
  -export([parse/2, parse/3,
           parse_unix/2, parse_now/2, parse_datetime/2,
           format/2, format/3,
           format_unix/2, format_now/2, format_datetime/2]).
  -define(STUB, not_loaded(?LINE)).
  -define(M, 1000000).
  -define(c, calendar).
  -define(EPOCH_ZERO, ?c:datetime_to_gregorian_seconds({{1970, 1, 1},
                                                        {0, 0, 0}})).
  -ifdef(DEBUG).
  -compile([export_all]).
  -endif.
  
  
  -type unix_timestamp() :: pos_integer().
  -type format()         :: binary()
  
negative.code:                         | datetime.
  -type datetime_value() :: unix_timestamp()
                          | erlang:timestamp()
                          | calendar:datetime().
  
  %% @doc Parses {Type, Binary} tuple according to provided format, returns
  %%      ok/error tuples with datetime in format that depends on atom Type.
  