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: %% @doc Helper function similar to parse/3.
  %%      @equiv parse(Format, Binary, datetime)
  %% @end
  -spec parse_datetime(format(), binary()) -> {ok, ?c:datetime()}
                                            | {error, format_mismatch}.
  parse_datetime(Format, Bin) ->
      {ok, Timestamp} = parse_unix(Format, Bin),
      DT = ?c:gregorian_seconds_to_datetime(?EPOCH_ZERO + Timestamp),
      {ok, DT}.
  
  %% @doc Formats {Type, Datetime} tuple according to Format. The way in which
  
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.
  