Blinking snake

Ycal

NAME

ycal - A proper calendar program

SYNTAX

ycal [-h?qgjBaylmCzvnbV-] <month> <year>

DESCRIPTION

Ycal may be installed as cal on your system, as it is supposed to be a direct, more accurate and easier to use replacement for that program.

Ycal has many options, most of which have to do with formatting the output calendar. It is intended to remove the arbitrary limits set by cal and ncal, and to extend the functionality provided by the latter program. You can request a complete year or any quarter of a year, and you can have boxes drawn around each month in the output calendar. If the current date is contained in the output calendar, then it will be marked as such.

Month can be 1-12 or a name (“jan”, “January”, “jAn”, etc.); year is any number that cannot be assumed to be a month (and “0” fits this criterion; see the examples below).

OPTIONS

-h
Help, stdout.
-?
Help, stderr.
-v
Verbose.
-q##
Print the quarter of the year indicated by ##, which must be in the range 1-4.
-g
Use the Gregorian Proleptic Calendar exclusively.
-j
Use the Julian Proleptic Calendar exclusively.
-y
Print a calendar for the entire year selected.
-l
Put a box around each month of the output calendar.
-B
Print both the Julian and Gregorian Proleptic Calendars for the period selected; this option is not yet implemented.
-a
Print the Julian and Gregorian Proleptic Calendars and the “mixed” or “Bogus” style Calendar for the period selected; this option is not yet implemented.
-m
Print the selected calendar in the “mixed” or “Bogus” style used by cal, i.e., show the Julian Proleptic Calendar before the Changeover date and the Gregorian Proleptic Calendar after that date. This is the default.
-C<date>
Set the Changeover date to date; whitespace between the -C and date is fine. Not yet implemented is a method to obtain the Changeover date from the environment variable “CHANGEOVER.”
-z
Use the gmtime() call instead of the localtime() call, which only makes a difference in the date marked as “today” when your local time happens to be near midnight UTC.
-n
Assume that the screen is exactly 80 characters wide, and ignore the actual width. This only makes a difference in the -y or -q options.
-b
Print the output years as “2 BC” instead of “-1.”
--
Break out of the argument processing loop early; this is for entering negative years (“-4713”).
-V
Print version date and die.

EXAMPLES

$ date
Wed Nov 27 11:37:08 MST 1996
$ ycal
  November, 1996
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27*28 29 30
$ ycal jan
   January, 1996
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
$ ycal 0
  November,    0
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
$ ycal -q4 -- -1

			  * Q4 -0001 *
      October               November              December
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
          1  2  3  4                     1      1  2  3  4  5  6
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   7  8  9 10 11 12 13
12 13 14 15 16 17 18   9 10 11 12 13 14 15  14 15 16 17 18 19 20
19 20 21 22 23 24 25  16 17 18 19 20 21 22  21 22 23 24 25 26 27
26 27 28 29 30 31     23 24 25 26 27 28 29  28 29 30 31
                      30
$ ycal -lq4 -- -1

			  * Q4 -0001 *
+----------------------+----------------------+----------------------+
|           1  2  3  4 |                    1 |     1  2  3  4  5  6 |
|  5  6  7  8  9 10 11 |  2  3  4  5  6  7  8 |  7  8  9 10 11 12 13 |
| 12 13 14 15 16 17 18 |  9 10 11 12 13 14 15 | 14 15 16 17 18 19 20 |
| 19 20 21 22 23 24 25 | 16 17 18 19 20 21 22 | 21 22 23 24 25 26 27 |
| 26 27 28 29 30 31    | 23 24 25 26 27 28 29 | 28 29 30 31          |
|                   10 | 30                11 |                   12 |
+----------------------+----------------------+----------------------+
$ ycal -bnljy -- -4713

			   * 4714 BC *
+----------------------+----------------------+----------------------+
|  1  2  3  4  5  6  7 |           1  2  3  4 |           1  2  3  4 |
|  8  9 10 11 12 13 14 |  5  6  7  8  9 10 11 |  5  6  7  8  9 10 11 |
| 15 16 17 18 19 20 21 | 12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 |
| 22 23 24 25 26 27 28 | 19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 |
| 29 30 31             | 26 27 28             | 26 27 28 29 30 31    |
|                    1 |                    2 |                    3 |
+----------------------+----------------------+----------------------+
|                    1 |     1  2  3  4  5  6 |              1  2  3 |
|  2  3  4  5  6  7  8 |  7  8  9 10 11 12 13 |  4  5  6  7  8  9 10 |
|  9 10 11 12 13 14 15 | 14 15 16 17 18 19 20 | 11 12 13 14 15 16 17 |
| 16 17 18 19 20 21 22 | 21 22 23 24 25 26 27 | 18 19 20 21 22 23 24 |
| 23 24 25 26 27 28 29 | 28 29 30 31          | 25 26 27 28 29 30    |
| 30                 4 |                    5 |                    6 |
+----------------------+----------------------+----------------------+
|                    1 |        1  2  3  4  5 |                 1  2 |
|  2  3  4  5  6  7  8 |  6  7  8  9 10 11 12 |  3  4  5  6  7  8  9 |
|  9 10 11 12 13 14 15 | 13 14 15 16 17 18 19 | 10 11 12 13 14 15 16 |
| 16 17 18 19 20 21 22 | 20 21 22 23 24 25 26 | 17 18 19 20 21 22 23 |
| 23 24 25 26 27 28 29 | 27 28 29 30 31       | 24 25 26 27 28 29 30 |
| 30 31              7 |                    8 |                    9 |
+----------------------+----------------------+----------------------+
|  1  2  3  4  5  6  7 |           1  2  3  4 |                 1  2 |
|  8  9 10 11 12 13 14 |  5  6  7  8  9 10 11 |  3  4  5  6  7  8  9 |
| 15 16 17 18 19 20 21 | 12 13 14 15 16 17 18 | 10 11 12 13 14 15 16 |
| 22 23 24 25 26 27 28 | 19 20 21 22 23 24 25 | 17 18 19 20 21 22 23 |
| 29 30 31             | 26 27 28 29 30       | 24 25 26 27 28 29 30 |
|                   10 |                   11 | 31                12 |
+----------------------+----------------------+----------------------+
$
  

BUGS & SPECIAL CONSIDERATIONS

The ? in the -? must be escaped (preceded by a \) to prevent interpretation as a metacharacter by some shells.

SEE ALSO

ncal(I), easter(I), weekday(I), jday(I), jug(I), grj(I), day(I)

PLATFORMS SUPPORTED

UnixWare®

AUTHOR

Ivan Van Laningham. If you would like the C source, email me.

Previous Page
Table of Contents
Next Page

Main web site:  http://www.pauahtun.org

Valid HTML 4.01 Transitional