blob: 1fe64cf90837b6bf144d53b31382131416ebcb0d [file] [log] [blame]
Igor Sarkisovc9d10aa2020-10-06 15:22:51 -07001#!/bin/bash
2
3#
4# Copyright (C) 2007 Karel Zak <kzak@redhat.com>
5#
6# This file is part of util-linux-ng.
7#
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.
12#
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.
17#
18
19TS_TOPDIR="$(dirname $0)/../.."
20TS_DESC="1 month"
21
22. $TS_TOPDIR/functions.sh
23ts_init "$*"
24
25set -o pipefail
26
27USETERM=$( ts_has_option "useterm" "$*" )
28MYTIME="27 09 2006"
29
30[ "$USETERM" == "yes" ] && TS_VERBOSE="yes"
31ts_log ""
32
33ts_log "Gregorian - Monday-based week"
34if [ "$USETERM" == "yes" ]; then
35 $TS_CMD_CAL -1m $MYTIME
36fi
37$TS_CMD_CAL -1m $MYTIME >> $TS_OUTPUT
38
39ts_log "Gregorian - Sunday-based week"
40if [ "$USETERM" == "yes" ]; then
41 $TS_CMD_CAL -1s $MYTIME
42fi
43$TS_CMD_CAL -1s $MYTIME >> $TS_OUTPUT
44
45
46ts_log "Julian - Monday-based week"
47if [ "$USETERM" == "yes" ]; then
48 $TS_CMD_CAL -1mj $MYTIME
49fi
50$TS_CMD_CAL -1mj $MYTIME >> $TS_OUTPUT
51
52ts_log "Julian - Sunday-based week"
53if [ "$USETERM" == "yes" ]; then
54 $TS_CMD_CAL -1sj $MYTIME
55fi
56$TS_CMD_CAL -1sj $MYTIME >> $TS_OUTPUT
57
58ts_finalize
59