kit

Time

Built revision v17.10.0

Phoenix
Topics

Human support

Bring a missing role, layout, or state, or a rendering against the standard, to the session working on kit. Name the package and the entry.

Time

A time at a place in another zone names that zone.

A place whose country keeps several zones is named by its zone, never a city.

An interval at a place names its zone once, after the interval.

A table at a place names its zone once, after its caption.

ClassesFrance Time
ClassTime
Yoga class
Pilates
Supplier call

A range of times states only the parts that differ.

An interval with its day states the day once.

An interval carries the weekday where its role names it.

An interval with its day and weekday takes the reader's locale.

A moment in another locale reads whole in that locale's script.

A month states its month and year alone.

A long date and time and a date range wrap between their parts.

A duration states its hours and minutes, and a day or more stays in hours.

A duration in another locale takes that locale's own words.

Source
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.moment(reader(), ~U[2025-04-12 13:00:00Z])} /></p>
<p class="specimen-case-line">A time at a place in another zone names that zone.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.moment(reader(), ~U[2025-04-12 17:30:00Z], "Europe/Paris")} /></p>
<p class="specimen-case-line">A place whose country keeps several zones is named by its zone, never a city.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.moment(reader(), ~U[2025-04-12 17:30:00Z], "America/New_York")} /></p>
<p class="specimen-case-line">An interval at a place names its zone once, after the interval.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval(reader(), ~U[2025-04-12 07:00:00Z], ~U[2025-04-12 09:30:00Z], "Europe/Paris")} /></p>
<p class="specimen-case-line">A table at a place names its zone once, after its caption.</p>
<Kit.Phoenix.Table.prose_table>
  <:caption>Classes<Kit.Phoenix.Roles.Time.zone reader={Kit.Phoenix.Reader.at_place(reader(), "Europe/Paris")} /></:caption>
  <:column_headings label="Class" />
  <:column_headings label="Time" />
  <:row cells={[%Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words("Yoga class"), heading: true}, %Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words([Kit.Phoenix.Words.time(Kit.Phoenix.Time.interval(Kit.Phoenix.Reader.at_place(reader(), "Europe/Paris"), ~U[2025-04-14 07:00:00Z], ~U[2025-04-14 08:00:00Z]))])}]} />
  <:row cells={[%Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words("Pilates"), heading: true}, %Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words([Kit.Phoenix.Words.time(Kit.Phoenix.Time.interval(Kit.Phoenix.Reader.at_place(reader(), "Europe/Paris"), ~U[2025-04-16 09:00:00Z], ~U[2025-04-16 10:00:00Z]))])}]} />
  <:row cells={[%Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words("Supplier call"), heading: true}, %Kit.Phoenix.Table.ProseCell{value: Kit.Phoenix.Table.Fact.words([Kit.Phoenix.Words.time(Kit.Phoenix.Time.interval(Kit.Phoenix.Reader.at_place(reader(), "Europe/Paris"), ~U[2025-04-17 09:00:00Z], ~U[2025-04-17 10:00:00Z], "Europe/London"))])}]} />
</Kit.Phoenix.Table.prose_table>
<p class="specimen-case-line">A range of times states only the parts that differ.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval(reader(), ~U[2025-04-12 08:00:00Z], ~U[2025-04-12 10:30:00Z])} /></p>
<p class="specimen-case-line">An interval with its day states the day once.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_day(reader(), ~U[2025-04-12 08:00:00Z], ~U[2025-04-12 10:30:00Z])} /></p>
<p class="specimen-case-line">An interval carries the weekday where its role names it.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_weekday(reader(), ~U[2025-04-12 08:00:00Z], ~U[2025-04-12 10:30:00Z])} /></p>
<p class="specimen-case-line">An interval with its day and weekday takes the reader's locale.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_day(Kit.Phoenix.Reader.new(:hi, "Asia/Kolkata"), ~U[2025-04-12 03:30:00Z], ~U[2025-04-12 06:00:00Z])} /></p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.interval_with_weekday(Kit.Phoenix.Reader.new(:hi, "Asia/Kolkata"), ~U[2025-04-12 03:30:00Z], ~U[2025-04-12 06:00:00Z])} /></p>
<p class="specimen-case-line">A moment in another locale reads whole in that locale's script.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.moment(Kit.Phoenix.Reader.new(:hi, "Asia/Kolkata"), ~U[2027-03-01 06:30:00Z])} /></p>
<p class="specimen-case-line">A month states its month and year alone.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.month(reader(), 2025, 4)} /></p>
<p class="specimen-case-line">A long date and time and a date range wrap between their parts.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.moment(reader(), ~U[2026-09-28 00:35:00Z])} /></p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day_range(reader(), ~D[2026-09-28], ~D[2027-10-28])} /></p>
<p class="specimen-case-line">A duration states its hours and minutes, and a day or more stays in hours.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.duration(reader(), 90)} /></p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.duration(reader(), 1440)} /></p>
<p class="specimen-case-line">A duration in another locale takes that locale's own words.</p>
<p><Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.duration(Kit.Phoenix.Reader.new(:hi, "Asia/Kolkata"), 90)} /></p>