Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
cal(1)				  User Commands 			  cal(1)

NAME
     cal - display a calendar

SYNOPSIS
     cal [ [month] year]

DESCRIPTION
     The  cal  utility writes a Julian or Gregorian calendar to standard output.
     If the year operand is specified, a calendar for that year is  written.  If
     no operands are specified, a calendar for the current month is written.

     The  date	to  switch from the Julian calendar to the Gregorian calendar is
     controlled by the environment variable GREGORIAN and the current locale.

OPERANDS
     The following operands are supported:

     month     Specify the month to be displayed, represented as a decimal inte-
	       ger from 1 (January) to 12 (December). The default is the current
	       month.

     year      Specify the year for which the calendar is displayed, represented
	       as a decimal integer from 1 to 9999.  The default is the  current
	       year.

ENVIRONMENT
     See environ(7) for descriptions of the following environment variables that
     affect  the execution of cal: LANG, LC_ALL, LC_CTYPE, LC_TIME, LC_MESSAGES,
     and NLSPATH.

     TZ        Determine the timezone used to calculate the value of the current
	       month.

     GREGORIAN
	       Unless LC_ALL or LC_TIME have been set to C, the environment GRE-
	       GORIAN allows one to specify a switch date to change from the Ju-
	       lian calendar to the Gregorian calendar. The argument must be  in
	       the form:

		    yyyy/mm/dd

	       or

		    yyyy-mm-dd

	       and  holds  the	day  of the switch based on the Julian calendar.
	       For the catholic parts of the Holy Roman Empire,  this  would  be
	       1582/10/05  as  October 5th was replaced by October 15th in 1582.
	       For Prussia (Berlin), this would be 1612/08/23 as August 23th was
	       replaced by September 2th in 1612.

	       If GREGORIAN was not set or when in the C locale, the  switch  to
	       the  Gregorian  calendar  appears  as  if  GREGORIAN  was  set to
	       1752/9/3.  This is to make cal(1) compatible to the historic UNIX
	       definition.

	       A leading + sign in GREGORIAN allows one to  enforce  the  switch
	       date even when in the C locale.

EXIT STATUS
     The following exit values are returned:

     0	       Successful completion.

     >0        An error occurred.

ATTRIBUTES
     See attributes(7) for descriptions of the following attributes:

     +------------------------------+-----------------------------+
     |	     ATTRIBUTE TYPE	    |	   ATTRIBUTE VALUE	  |
     +------------------------------+-----------------------------+
     | Availability		    |SUNWesu			  |
     +------------------------------+-----------------------------+
     | Interface Stability	    |Standard			  |
     +------------------------------+-----------------------------+

SEE ALSO
     calendar(1), attributes(7), environ(7), standards(7)

NOTES
     In  case  that the environment GREGORIAN is not active, an unusual calendar
     is printed for September 1752. That is the month 11 days  were  skipped  in
     the Kingdom of Great Britain and their colonies to make up for lack of leap
     year adjustments. To see this calendar, type:

       cal 9 1752

     The command cal 83 refers to the year 83, not 1983.

     The year is always considered to start in January.

BUGS
     None currently known.

     Mail  bugs  and  suggestions  to  schilytools@mlists.in-berlin.de or open a
     ticket at https://codeberg.org/schilytools/schilytools/issues.

     The mailing list archive may be found at:

     https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.

SunOS 5.11			   2022/10/06				  cal(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=scal&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help