- Aug
- 2,832
- 149
The main calendar I use is the QCAL command from the ISO8601 plugin.
Sometimes, though,
I need a calendar that shows the day of the year.
I have Cygwin installed on my system,
which has the CAL.EXE command.
Thus, CAL.EXE -j gives me a calendar,
showing the day-of-the-year.
Here's my alias to enable cygwin,
execute cal.exe -j,
disable cygwin,
and reset the terminal colour.
Here's my library command to enable/disable cygwin,
Ref: Enable/Disable Cygwin On Demand
Joe
Sometimes, though,
I need a calendar that shows the day of the year.
I have Cygwin installed on my system,
which has the CAL.EXE command.
Code:
E:\Utils>cal --help
Usage:
cal [options] [[[day] month] year]
cal [options] <timestamp|monthname>
Display a calendar, or some part of it.
Without any arguments, display the current month.
Options:
-1, --one show only a single month (default)
-3, --three show three months spanning the date
-n, --months <num> show num months starting with date's month
-S, --span span the date when displaying multiple months
-s, --sunday Sunday as first day of week
-m, --monday Monday as first day of week
-j, --julian use day-of-year for all calendars
--reform <val> Gregorian reform date (1752|gregorian|iso|julian)
--iso alias for --reform=iso
-y, --year show the whole year
-Y, --twelve show the next twelve months
-w, --week[=<num>] show US or ISO-8601 week numbers
-v, --vertical show day vertically instead of line
-c, --columns <width> amount of columns to use
--color[=<when>] colorize messages (auto, always or never)
colors are enabled by default
-h, --help display this help
-V, --version display version
For more details see cal(1).
Thus, CAL.EXE -j gives me a calendar,
showing the day-of-the-year.
Here's my alias to enable cygwin,
execute cal.exe -j,
disable cygwin,
and reset the terminal colour.
Code:
E:\Utils>alias calj
cyg on & cal.exe -j & cyg off & color 07
Here's my library command to enable/disable cygwin,
Code:
E:\Utils>library /f cyg
utils.library$cyg {
@echo off
if %@search[sort.exe] eq C:\cygwin64\bin\sort.exe set cygwin=y
if %@search[sort.exe] eq C:\WINDOWS\system32\sort.exe set cygwin=n
::
:: Pre-pend the cygwin folder to the path
if %1 eq on .and. %cygwin eq n set path=c:\cygwin64\bin;%path%
::
:: Remove the cygwin folder from the path
if %1 eq off .and. %cygwin eq y path /d c:\cygwin64\bin
::
if %@search[sort.exe] eq C:\cygwin64\bin\sort.exe set cygwin=y
if %@search[sort.exe] eq C:\WINDOWS\system32\sort.exe set cygwin=n
}
Ref: Enable/Disable Cygwin On Demand
Joe