[Smaug] A quick scripting puzzle
Peter Belew
abcruzww at gmail.com
Fri Nov 18 13:07:12 PST 2005
On 11/18/05, cerise at armory.com <cerise at armory.com> wrote:
> Although, if I recall correctly, the Gregorian calendar was adopted
> prior to 1752 elsewhere. I remember hearing that Newtonmas was only
> accurate in England at the time.
Yes, it was adopted in some Catholic countries a couple of hundred
years earlier. (I think ~ 170 years, actually) And when the British adopted
it, they didn't refer to it as "Gregorian". It took until sometime in
the 20th century for its adoption to be nearly universal. Orthodox
Christians generally use the Julian calendar for the dates of
church holidays and festivals. Other cultures and religions of course
still retain their own calendars aside from the Gregorian calendar
for international trade and diplomatic purposes, etc.
Aside from changing from the Julian calendar, the 1751 act (which
took effect in 1752) changed the start of the legal year from
March 25 to Jan 1. An exception is the British treasury, which
changed the start of its accounting year only because of the
calendar change, to April 5 from April 16 (??), rather than to
Jan 1. Note that many dates from the 18th century and earlier
that are in the first part of the year show two years, like
"Jan 15 1750/51" due to the year starting on Jan 1 and Mar 25
for different purposes. This like our present distinction among
calendar and tax and fiscal and school years.
http://www.catholicireland.net/pages/index.php?nd=100&art=559
Here's the full text of the Calendar Act:
http://webexhibits.org/calendars/year-text-British.html
Note that Pope Gregory or the word 'Gregorian' aren't mentioned
in the act, but the Anglican Church calendar is modified so that
it is in effect in alignment with the Roman Catholic calendar.
- Peter
>
> -Phil/CERisE
>
> On Fri, Nov 18, 2005 at 11:19:25AM -0800, Peter Belew wrote:
> > That one doesn't work all the time. Try
> >
> > cal 10 2005 | tail -2 | head -c2
> >
> > You get the Sunday before the last one. 'cal' outputs a constant
> > number of lines, so there is variable padding at the bottom.
> > I took care of that in my implementation, to be published
> > publicly after I see a few more responses.
> >
> > BTW if you try
> >
> > cal 9 1752
> >
> > you'll see even more blank lines. :) We can thank Lord
> > Chesterfield for that one (as well as Pope Gregory et al.)
> >
> > (BTW thanks to James for suggesting the trick that solved that one
> > in my solution).
> >
> > - Peter
> >
> > On 11/18/05, Dash McElroy <dmcelroy at bayfed.com> wrote:
> > > I matched it:
> > >
> > > LASTSUNDAY=`cal|tail -2|head -c2`
> > >
> > > v.s.
> > >
> > > LASTSUNDAY=`cal|rev`|rev|cut -b-2
> > >
> > > -Dash
> > >
> > >
> > > On Nov 18, 2005, at 9:03 AM, Rick Moen wrote:
> > >
> > > > Quoting Anthony Ettinger (apwebdesign at yahoo.com):
> > > >
> > > >> echo `cal|rev`|rev|cut -b-2
> > > >
> > > > Elegant! I suspect that's going to be difficult to beat.
> > > >
> > > >
> > > > _______________________________________________
> > > > Smaug mailing list
> > > > Smaug at lists.svlug.org
> > > > http://lists.svlug.org/lists/listinfo/smaug
> > > > Smaug home page: http://www.scruz.org/
> > >
> > >
> > > _______________________________________________
> > > Smaug mailing list
> > > Smaug at lists.svlug.org
> > > http://lists.svlug.org/lists/listinfo/smaug
> > > Smaug home page: http://www.scruz.org/
> > >
> > >
> >
> > _______________________________________________
> > Smaug mailing list
> > Smaug at lists.svlug.org
> > http://lists.svlug.org/lists/listinfo/smaug
> > Smaug home page: http://www.scruz.org/
>
> _______________________________________________
> Smaug mailing list
> Smaug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/smaug
> Smaug home page: http://www.scruz.org/
>
>
More information about the Smaug
mailing list