Module Betacalendars.Month_grid

type layout =
  1. | Compact
  2. | Fixed_six_weeks

Stable rectangular layouts for civil months.

type overflow =
  1. | Adjacent_dates
  2. | Empty
type cell = {
  1. date : Civil_date.t option;
  2. row : int;
  3. column : int;
  4. weekday : Weekday.t;
  5. in_requested_month : bool;
}

One date position in a month grid.

type t = {
  1. year : int;
  2. month : int;
  3. first_weekday : Weekday.t;
  4. rows : cell list list;
}

A month and its rows of seven cells.

val make : year:int -> month:int -> first_weekday:Weekday.t -> layout:layout -> overflow:overflow -> unit -> (t, Civil_date.error) Stdlib.result

Generate a grid. Fixed layout has 42 cells; compact layout has the minimum whole weeks.

val cells : t -> cell list

Flatten rows in display order.

val row_count : t -> int

Number of weeks in this grid.