# `MpxjEx.Calendar`
[🔗](https://github.com/rocket4ce/mpxj_ex/blob/v0.1.0/lib/mpxj_ex/calendar.ex#L1)

A working time calendar.

`:days` maps each weekday (`:monday` ... `:sunday`) to a map with a
`:type` (`:working`, `:non_working` or `:default`, which means "inherit
from the parent calendar") and `:hours`, a list of `{from, to}` `Time`
tuples.

`:exceptions` lists the dates that differ from the normal week, each a map
with `:from` and `:to` (`Date`s), `:type`, `:hours`, an optional `:name`
and, for recurring exceptions, a `:recurrence` map.

`:working_weeks` lists alternative weeks for a date range, each a map with
`:name`, `:effective_from`, `:effective_to` and `:days`.

# `day`

```elixir
@type day() :: %{type: day_type(), hours: [{Time.t(), Time.t()}]}
```

# `day_type`

```elixir
@type day_type() :: :working | :non_working | :default
```

# `t`

```elixir
@type t() :: %MpxjEx.Calendar{
  days: %{optional(atom()) =&gt; day()},
  exceptions: [map()],
  guid: String.t() | nil,
  minutes_per_day: integer() | nil,
  minutes_per_month: integer() | nil,
  minutes_per_week: integer() | nil,
  minutes_per_year: integer() | nil,
  name: String.t() | nil,
  parent_unique_id: integer() | nil,
  personal: boolean(),
  type: atom() | nil,
  unique_id: integer(),
  working_weeks: [map()]
}
```

---

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