]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/cal/yearw
2f5d2c40c2aa95ffd2ebbca6c348f4e053be47ef
4 # Copyright (C) 2007 Karel Zak <kzak@redhat.com>
6 # This file is part of util-linux.
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This file is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 TS_TOPDIR
="${0%/*}/../.."
19 TS_DESC
="year with week numbers"
21 .
$TS_TOPDIR/functions.sh
24 ts_check_test_command
"$TS_CMD_CAL"
28 USETERM
=$
( ts_has_option
"useterm" "$*" )
31 [ "$USETERM" == "yes" ] && TS_VERBOSE
="yes"
34 ts_log
"Gregorian - Monday-based week with week numbers"
35 if [ "$USETERM" == "yes" ]; then
36 $TS_CMD_CAL -ymw $MYTIME
38 $TS_CMD_CAL -ymw $MYTIME >> $TS_OUTPUT
40 ts_log
"Gregorian - Sunday-based week with week numbers"
41 if [ "$USETERM" == "yes" ]; then
42 $TS_CMD_CAL -ysw $MYTIME
44 $TS_CMD_CAL -ysw $MYTIME >> $TS_OUTPUT
47 ts_log
"Julian - Monday-based week with week numbers"
48 if [ "$USETERM" == "yes" ]; then
49 $TS_CMD_CAL -ymjw $MYTIME
51 $TS_CMD_CAL -ymjw $MYTIME >> $TS_OUTPUT
53 ts_log
"Julian - Sunday-based week with week numbers"
54 if [ "$USETERM" == "yes" ]; then
55 $TS_CMD_CAL -ysjw $MYTIME
57 $TS_CMD_CAL -ysjw $MYTIME >> $TS_OUTPUT