# HG changeset patch # User markus schnalke # Date 1393273341 -3600 # Node ID d18a3b2b76bd7f3b929b5f502858a6e7d48bf1c4 # Parent 79d22407a6bed05da28c062372923a7b75e343bf updated man page; s/-W/-w/ diff -r 79d22407a6be -r d18a3b2b76bd bday.1 --- a/bday.1 Mon Feb 24 21:11:38 2014 +0100 +++ b/bday.1 Mon Feb 24 21:22:21 2014 +0100 @@ -5,7 +5,7 @@ .SH SYNOPSIS -.BR bday\ [ -W +.BR bday\ [ -w .IR defwarn ] @@ -22,11 +22,11 @@ .SH OPTIONS .TP -.BI -W\ warn +.BI -w\ warn Warn .I warn days in advance, for entries that have no -.B w +.B #w flag (see .BR FILE\ FORMAT ). If this switch is not specified, it defaults to 14 days. @@ -39,43 +39,44 @@ .RB ` # ', is a comment and will be ignored. -Any other line specifies the name of a person or event, followed by an equals sign and -a date and finally some extra options. The date has to be in ISO 8601 date format (YYYY-MM-DD). -The extra options are: +Any other line specifies a date, optional modifiers, and the +name of a person or event. +The date has to be in ISO 8601 date format (YYYY-MM-DD). +The optional modifiers are words, starting with a hash symbol (#). .TP -.B bd -This line is a birthday (the default). The year, if given, should be when the person was born. A line designated as a -birthday will produce output like -.B Erin has a birthday in 3 days' time -or -.BR "Jemima is 3 in 2 weeks' time" . +Without a modifier, the entry is a birthday. +The year, if given, should be when the person was born. +A line designated as a birthday will produce output like +.B In 3 days: Erin has a birthday. +.PP +The modifiers are: .TP -.B ann +.B #ann This line is an anniversary. The year, if given, should be the year in which the thing happened, producing output like -.B Pen exploded 3 years ago tomorrow +.B Tomorrow: Pen exploded 3 years ago given a line such as -.BR "Pen exploded=1993-09-12 ann" . +.BR "1993-09-12 #ann Pen exploded" . .TP -.B ev +.B #ev This line is an event of some sort. If a year is given, the text will be displayed in that year only; otherwise, it will be displayed every year. The remaining time is simply appended to the text; for instance, the input -.B Easter=1996-04-07 ev +.B 1996-04-07 #ev Easter would give rise to the text -.BR "Easter in 1 week's time" . +.BR "In 1 week: Easter" . .TP -.BI w n +.BI #w n Warn .I n days in advance of the date, rather than the default of 14 days or the number given with the -.B -W +.B -w flag. .TP -.BI for\ days +.BI #for days The event lasts for .B days days. .TP -.BI to\ date +.BI #to date The event lasts until .IR date , which should be in the same format as for the date of the event. @@ -84,7 +85,7 @@ .SH EXAMPLE -Joe Blow=1974-04-25 +1974-04-25 Joe Blow @@ -101,9 +102,11 @@ .SH CREDITS -This Program is heavily based on birthday. But without all non essential stuff. Nevertheless, much thanks for birthday, Andy! +This Program is heavily based on birthday. But without all non +essential stuff. Nevertheless, much thanks for birthday, Andy! .SH AUTHOR -markus schnalke and Andy Mortimer +markus schnalke +and Andy Mortimer diff -r 79d22407a6be -r d18a3b2b76bd bday.c --- a/bday.c Mon Feb 24 21:11:38 2014 +0100 +++ b/bday.c Mon Feb 24 21:22:21 2014 +0100 @@ -706,7 +706,7 @@ main(int argc, char *argv[]) { while (--argc > 0 && **++argv == '-') { - if (strcmp(argv[0], "-W") == 0) { + if (strcmp(argv[0], "-w") == 0) { /* TODO: catch if no value given */ def_warn = atoi((++argv)[0]); argc--;