LinuxCommandLibrary

jcal

Display a calendar in the terminal

TLDR

Display a calendar for the current month

$ jcal
copy

Display the previous, current, and next months
$ jcal -3
copy

Display a calendar for a specific year (4 digits)
$ jcal [year]
copy

Display a calendar for a specific month and year
$ jcal [year] [month]
copy

SYNOPSIS

jcal [OPTIONS] [MONTH [YEAR]]
jcal -j GREGORIAN_DATE
jcal -g JULIAN_DATE

PARAMETERS

-j
    Converts a Gregorian date (e.g., 'YYYY-MM-DD' or 'MM/DD/YYYY') to its corresponding Julian day number. The output is a single integer.

-g
    Converts a Julian day number back to its Gregorian date equivalent. The output typically includes the year, month, and day.

-J
    Displays the Julian day number for each day within the generated monthly or yearly calendar view, alongside the conventional Gregorian day number.

-a
    Shows the Astronomical Julian Date (JD) for the current or specified date. This is a highly precise, continuous count of days and fractions of a day from a specific astronomical epoch.

-s
    Prints only the current Julian day number for today's date.

[MONTH [YEAR]]
    Specifies the month (1-12) and year (e.g., 2023) for which to display the calendar. If omitted, jcal defaults to the current month and year, similar to cal.

-d
    Specifies a particular date for operations like conversion or display. The format for DATE can vary, but commonly includes 'YYYY-MM-DD'.

DESCRIPTION

jcal is a specialized command-line utility used to display calendars, primarily focusing on Julian dates. Unlike the standard cal command which typically displays Gregorian calendars, jcal can show the Julian day number for a given date, convert between Gregorian and Julian dates, or display a calendar with Julian day numbers alongside conventional dates.

It's particularly useful for astronomers, historians, or anyone working with non-Gregorian date systems or requiring precise day numbering from a historical or scientific perspective. Some implementations can also display astronomical Julian dates, which are a continuous count of days and fractions of a day from a specific epoch (usually January 1, 4713 BC in the Julian calendar).

CAVEATS

jcal is not part of standard GNU Coreutils and may not be installed by default on all Linux distributions. Its features and exact options can vary significantly between different implementations (e.g., versions from bsd-calendar, astronomy packages, or custom scripts). Users might need to install an astronomy or ephemeris package to obtain it.

HISTORY

The concept of Julian dates predates modern computing, being used extensively in astronomy and history to provide a continuous count of days, simplifying calculations of elapsed time between widely separated events. The jcal utility provides a convenient command-line interface to these calculations, making it accessible for quick lookups and conversions. Its development is often tied to specialized astronomical software suites or utilities, reflecting its niche but important role in handling various date systems beyond the standard Gregorian calendar, particularly for scientific and historical purposes.

SEE ALSO

cal(1), date(1)

Copied to clipboard