# `Ascii.Kit.Clock`
[🔗](https://github.com/houllette/ascii_art/blob/main/lib/ascii/kit/clock.ex#L1)

The wall clock for `clock: true` pieces, from `env.now`.

Upstream reads `Date.now()` and the local time from `Date`. Here `env.now`
is a `DateTime`, whose own offset says what local time it is, or `nil` for
the system clock in the system's time zone.

# `local`

```elixir
@spec local(env :: Ascii.Env.t(), ms :: number()) :: NaiveDateTime.t()
```

The local wall time at `ms` milliseconds since the epoch, as `new Date(ms)`
reads it: in `env.now`'s offset, or the system's time zone.

# `now_ms`

```elixir
@spec now_ms(env :: Ascii.Env.t()) :: integer()
```

Milliseconds since the epoch: `Date.now()`.

# `weekday`

```elixir
@spec weekday(date :: Date.t() | NaiveDateTime.t()) :: 0..6
```

`getDay()`: 0 for Sunday to 6 for Saturday.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
