Home Explore Blog CI



nushell

commands/docs/cal.md
ae73bdae20f191e25662949d52adafae207de45a831466c00000000300000503
---
title: cal
categories: |
  generators
version: 0.104.0
generators: |
  Display a calendar.
usage: |
  Display a calendar.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `cal` for [generators](/commands/categories/generators.md)

<div class='command-title'>Display a calendar.</div>

## Signature

```> cal {flags} ```

## Flags

 -  `--year, -y`: Display the year column
 -  `--quarter, -q`: Display the quarter column
 -  `--month, -m`: Display the month column
 -  `--as-table, -t`: output as a table
 -  `--full-year {int}`: Display a year-long calendar for the specified year
 -  `--week-start {string}`: Display the calendar with the specified day as the first day of the week
 -  `--month-names`: Display the month names instead of integers


## Input/output types:

| input   | output |
| ------- | ------ |
| nothing | table  |
## Examples

This month's calendar
```nu
> cal

```

The calendar for all of 2012
```nu
> cal --full-year 2012

```

This month's calendar with the week starting on Monday
```nu
> cal --week-start mo

```

How many 'Friday the Thirteenths' occurred in 2015?
```nu
> cal --as-table --full-year 2015 | where fr == 13 | length

```

Chunks
0143d41e (1st chunk of `commands/docs/cal.md`)
Title: cal: Display a Calendar in Nushell
Summary
The `cal` command in Nushell is a generator that displays a calendar. It can show the current month, a full year, or be customized to start the week on a specified day. Flags allow for displaying year, quarter, and month columns, outputting as a table, and showing month names instead of numbers. Examples demonstrate how to use `cal` to view calendars, specify the start day of the week, and analyze 'Friday the Thirteenths' in a given year.