Michael
A year of weeks (ISO) may be 52 or 53, depending on when the first Thursday of
the month lands.
Therefore a quarter of a year may include 13 or 13.5 weeks. (one definition).
The other, by your simple shell script, it provides a second definition, based
on the calendar.
One more ponderable, Do we take days in the year and use 1 Jan as the start of
a quarter, or the first week to be the one containing the Sunday that first
precedes or has 1 January (Dec 27th 2016)?
Regards
Leslie
Mr. Leslie Satenstein
Montréal Québec, Canada
From: Michael Stone <[email protected]>
To: Pádraig Brady <[email protected]>
Cc: john woods <[email protected]>; [email protected]
Sent: Thursday, October 6, 2016 8:03 AM
Subject: Re: quarter code for date
On Thu, Oct 06, 2016 at 12:53:41PM +0100, Pádraig Brady wrote:
>It's not that awkward to get the quarter number: $(( ($(date +%-m)-1)/3+1 ))
^^^ this is how you can tell someone's been doing shell scripting too
long :-D
Mike Stone