help cal -------------------------------------------------------------------------------


cal -- Calendar


cal [, options]

options Description ------------------------------------------------------------------------- Main replace Make dataset for the specified or current year y() Specified a year in brackets. -------------------------------------------------------------------------


cal Display a calendar for a specified year


+------+ ----+ Main +-------------------------------------------------------------

replace - could be specified as an option for cal. cal does not generate a data set in Stata. However when replace is specified, a dataset consisting of the year, month, day and date of the specified year is created in Stata.

y - year should be between 100 to 9999. If year is not specified Stata would display the calendar according to the current date on the computer.


1. To view the present calendar year

. cal (click to run)

2. To view the calendar for 2025

. cal,y(2025) (click to run)

3. To create a dataset-containing year, month, day and date for 2012

. cal,y(2025)replace (click to run)

Author K. Chamara Anuranga Institute for Health Policy Sri Lanka