View Source Timex.Parse.DateTime.Tokenizer behaviour (timex v3.7.11)

Defines the API for a custom tokenizer which can extend Timex's datetime parsing facilities.

Link to this section Summary

Link to this section Callbacks

@callback apply(DateTime.t(), token :: atom(), value :: term()) ::
  DateTime.t() | {:error, term()} | :unrecognized
@callback tokenize(format_string :: String.t()) ::
  {:ok, [Timex.Parse.DateTime.Tokenizers.Directive.t()]} | {:error, term()}