cal: Command Line Calendar

Description Usage Arguments Value References Examples

Description

A command line calendar in the style of the Unix cal command line tool though with only only flag.

Usage

1
cal(cmd = "-r 2", ncols = NULL, ...)

Arguments

cmd

A string in the form of Month (int/char) AND/OR Year (4 digits). Below are the forms that are accepted:

2017

A full calendar for the year

03

A single month view

Jan

A single month view (case insensitive)

January

A single month view (case insensitive)

2:5

A multi month view (integers must be > 0 and < 13)

-r 4

A multi month view relative to the current month (curent month + n more; integers must be positive and < 13)

-r -3:4

A multi month view relative to the current month (curent month +/- n before/after; -r tag not required; lower must be negative; must be less than or equal to 12 months all together)

03 2015

A single month view for a particular year

Jan 2015

A single month view for a particular year (case insensitive)

January 2015

A single month view for a particular year (case insensitive)

The default is '-r 2' which prints this month and the next 2.

ncols

The number of columns to form the print grid. This can be set globally via options(cal.ncols = 4)

...

ignored.

Value

Prints calendar to the command line.

References

https://www.tutorialspoint.com/unix_commands/cal.htm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cal()
cal("2017")
cal("03")
cal("Jan")
cal("december")
cal("2:5")
cal("-r 4")
cal("-r -3")
cal("-r -3:4")
cal("03 2015")
cal("Jan 2015")
cal("January 2015")

trinker/cal documentation built on May 26, 2019, 5:33 a.m.