[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: quarter code for date
From: |
Leslie S Satenstein |
Subject: |
Re: quarter code for date |
Date: |
Fri, 7 Oct 2016 02:54:04 +0000 (UTC) |
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 <address@hidden>
To: Pádraig Brady <address@hidden>
Cc: john woods <address@hidden>; address@hidden
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