4 # Copyright (C) 2007 Karel Zak <kzak@redhat.com>
6 # This file is part of util-linux-ng.
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="$(dirname $0)/../.."
21 . $TS_TOPDIR/functions.sh
26 USETERM=$( ts_has_option "useterm" "$*" )
29 [ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
32 ts_log "Gregorian - Monday-based week"
33 if [ "$USETERM" == "yes" ]; then
34 $TS_CMD_CAL -3m $MYTIME
36 $TS_CMD_CAL -3m $MYTIME >> $TS_OUTPUT
38 ts_log "Gregorian - Sunday-based week"
39 if [ "$USETERM" == "yes" ]; then
40 $TS_CMD_CAL -3s $MYTIME
42 $TS_CMD_CAL -3s $MYTIME >> $TS_OUTPUT
45 ts_log "Julian - Monday-based week"
46 if [ "$USETERM" == "yes" ]; then
47 $TS_CMD_CAL -3mj $MYTIME
49 $TS_CMD_CAL -3mj $MYTIME >> $TS_OUTPUT
51 ts_log "Julian - Sunday-based week"
52 if [ "$USETERM" == "yes" ]; then
53 $TS_CMD_CAL -3sj $MYTIME
55 $TS_CMD_CAL -3sj $MYTIME >> $TS_OUTPUT