Re: [RFC/PATCH] week numbers for cal

Tommi Kyntola
2013-10-07T11:39:29Z

Why not. I wasn't sure what exactly should be done with 52 when many
years have days belonging to two different 52 weeks, but I came up
with a spec that says it points to the week that starts during the
relevant year.

A patch in guthub:
https://github.com/Kynde/util-linux/commit/3a53abddc14f46eccb4264668b24875054f5ba62

cheers,
Tommi Kyntola
---
commit 3a53abddc14f46eccb4264668b24875054f5ba62
Author: Tommi Kyntola <kynde@iki.fi>
Date: Mon Oct 7 14:32:23 2013 +0300

cal: added argument option for -w|--week to display that week

Because many years have two sections of week 52 or 53, the week that
this argument points to is the one that starts during that year (when availa
The week number in argument is also highlighted in addition to possibly visi
current/defined date highlighting.

Signed-off-by: Tommi Kyntola <kynde@iki.fi>

misc-utils/cal.1 | 2 +-
misc-utils/cal.c | 115 +++++++++++++++++++++++++++++++++------
tests/expected/cal/weekarg | 127 +++++++++++++++++++++++++++++++++++++++++++
tests/ts/cal/weekarg | 131 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 358 insertions(+), 17 deletions(-)