LinuxCommandLibrary

ncal

Display a calendar in the terminal

TLDR

View documentation for the original command

$ tldr cal
copy

SYNOPSIS

ncal [options] [[[month] year]]

PARAMETERS

-1
    Display single month output.

-3
    Display previous, current and next month surrounded by the current month.

-A
    Display the number of months after the current month.

-B
    Display the number of months before the current month.

-C
    Do not print leading and trailing blank lines.

-d
    Use specified date instead of the current date.

-e
    Use European week numbering (ISO 8601).

-h
    Disable highlighting of today.

-H
    Use the color specified to highlight today.

-J
    Output Julian dates.

-m
    Display the specified month.

-N
    Same as -w, but week starts on Monday.

-p
    Print the country string of the current locale.

-s
    The argument is used as the locale name for the strftime(3) routine to produce a string to replace the month heading.

-V
    Print the version number.

-w
    Week starts on Sunday.

-x
    Display calendar in the format of 'cal'.

-y
    Display the whole year.

DESCRIPTION

The ncal command displays a calendar in the terminal. It's a more feature-rich version of the traditional cal command, offering options to display calendars for specific months, years, or even the entire year. ncal can also display calendars for different countries and cultures, taking into account regional date and weekday conventions. It provides a visually appealing and informative calendar representation within the command-line environment. Options exist to control first day of week, highlighting, and the output format to best suit user's needs. It's a quick and convenient way to check dates and plan schedules without needing a graphical user interface.

CAVEATS

Locale settings can significantly impact the output, particularly with the -s option. Pay attention to system locale to get expected results.

LOCALE SUPPORT

ncal leverages the system's locale settings to determine the display format of the calendar. This includes the language for month and day names, the starting day of the week, and other regional date conventions. Ensure your locale is correctly configured for accurate calendar representation.
For Example: LC_ALL=fr_FR.UTF-8 ncal

COLOR HIGHLIGHTING

The -H option allows you to specify the color used for highlighting the current day. The color names accepted depend on the terminal capabilities and may include standard colors like red, green, blue, etc.

HISTORY

The ncal command is a more recent and feature-rich alternative to the older cal command. It was developed to provide greater flexibility and customization options for displaying calendars in the terminal. Its inclusion in standard Linux distributions has made it a widely used utility for command-line calendar viewing and date management.

SEE ALSO

cal(1), date(1)

Copied to clipboard