Timex.Parse.DateTime.Tokenizers.Default (timex v3.7.13)

View Source

Implements the parser for the default DateTime format strings.

Summary

Functions

Applies a given token + value to the DateTime represented by the current input string.

Tokenizes the given format string and returns an error or a list of directives.

Functions

apply(_, _, _)

@spec apply(DateTime.t(), atom(), term()) ::
  DateTime.t() | {:error, term()} | :unrecognized

Applies a given token + value to the DateTime represented by the current input string.

tokenize(str)

@spec tokenize(String.t()) ::
  {:ok, [Timex.Parse.DateTime.Tokenizers.Directive.t()]} | {:error, term()}

Tokenizes the given format string and returns an error or a list of directives.