mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
cal: Make start of the week configurable
Making all the other parts of the world happier :^) Add a `--starting-day` (`-s`) option to be compatible with GNU cal, which has a similar option. The GNU option takes allows passing either an int or a day name. Let's do something similar using weekdays we already have in AK/DateConstants.h. Also add myself to the copyright header, as by now I've modified most of the lines in this file.
This commit is contained in:
parent
b4bec4dd2f
commit
114da3a275
2 changed files with 54 additions and 7 deletions
|
@ -5,7 +5,7 @@ cal - Display a calendar
|
|||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ cal [[month] year]
|
||||
$ cal [--starting-day weekday] [[month] year]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
@ -17,6 +17,10 @@ The current day is always highlighted.
|
|||
|
||||
Days, months and years are specified with numbers. Week starts at Sunday.
|
||||
|
||||
## Options
|
||||
|
||||
* `-s`, `--starting-day`: Specify which day should start the week. Accepts either short or long weekday names or indexes (0 being Sunday).
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue