# orca.month

> A module of Orca's API.

`Month`: the partition key of a monthly pipeline.

A month is written `YYYY-MM`, and a range of them `2024-01..2024-12`, both
ends included. A run is over a list of months; a mapped step runs once for
each.

## Structs

### `Month`

```mojo
struct Month
```

A calendar month, `month` from 1 to 12.

Implements: `Copyable`, `Equatable`, `Key`, `Movable`, `TimeKey`, `Writable`

Fields:

- `year: Int`
- `month: Int`

#### `__lt__`

```mojo
def __lt__(self, other: Self) -> Bool
```

#### `__eq__`

```mojo
def __eq__(self, other: Self) -> Bool
```

#### `parse`

```mojo
def parse(s: StringSpan) -> Self
```

Reads `YYYY-MM`.

#### `next`

```mojo
def next(self) -> Self
```

The month after this one.

#### `prev`

```mojo
def prev(self) -> Self
```

The month before this one.

#### `containing`

```mojo
def containing(year: Int, month: Int, day: Int) -> Self
```

#### `write_to`

```mojo
def write_to(self, mut writer: T)
```

## Functions

### `days_in`

```mojo
def days_in(year: Int, month: Int) -> Int
```

The number of days in a month of the Gregorian calendar.

### `parse_months`

```mojo
def parse_months(s: StringSpan) -> List[Month]
```

Reads `YYYY-MM`, `YYYY-MM..YYYY-MM` (both ends included), or a comma-separated list of either, in the order given.
