Dextrin.Duration (Dextrin v0.1.0)

Copy Markdown View Source

DXN duration (@duration "P..."). Each field is integer() | nil — only fields actually present in the source set a bit in .dxnb's bitmask (DXN.md §2.3). years/months are calendar-relative (variable length) and not reducible to a single elapsed-time scalar, so all seven fields are tracked independently rather than folded into one (DXN.md §1.4).

Summary

Types

t()

@type t() :: %Dextrin.Duration{
  days: integer() | nil,
  hours: integer() | nil,
  microseconds: integer() | nil,
  minutes: integer() | nil,
  months: integer() | nil,
  weeks: integer() | nil,
  years: integer() | nil
}

Functions

new(fields \\ [])

@spec new(keyword()) :: t()