Koyomi.Week (Koyomi v0.2.1)

Copy Markdown View Source

An Ecto type for an ISO 8601 week, stored in a :date column as the Monday of the week.

field :sprint, Koyomi.Week

The week picker posts YYYY-Www ("2027-W11"), as the browser's own week input does. The type casts it and a Date (any day of the week). The value is the Monday of the week: ~D[2027-03-15]. See Koyomi.ISOWeek for the week number of a value.

Summary

Functions

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Functions

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.