Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.sinclair > #160
| From | "Brian Gaff" <Briang1@blueyonder.co.uk> |
|---|---|
| Newsgroups | comp.sys.sinclair |
| Subject | Re: Sinclair mentioned on the Today programme on Radio 4 this morning |
| Date | 2011-04-13 08:12 +0100 |
| Organization | Crazy nothing |
| Message-ID | <io3ic1$jr4$1@dont-email.me> (permalink) |
| References | <hqkv4r$1sl$1@speranza.aioe.org> <io26kf$19o$1@speranza.aioe.org> |
Ah the space time continuum has warped again... grin Brian -- Brian Gaff....Note, this account does not accept Bcc: email. graphics are great, but the blind can't hear them Email: briang1@blueyonder.co.uk ______________________________________________________________________________________________________________ "Milton Lachman" <lachman@ebony.ppc.ubc.ca> wrote in message news:io26kf$19o$1@speranza.aioe.org... > [Here's the revision of the table-based Date-stamp > conversion routine w/out April Fools' Easter Eggs.] > > Given: > > D$(8) as a Date-stamp CCYYMMDD in basic ISO format > F% as a Flag (1 for Gregorian, 0 for Julian or quasi-Old-Style) > T$ as a table of offsets > > the superBASIC routine below is to compute: > > w% as the ISO-compatible number of the corresponding weekday: > Sun=0 Mon=1 Tue=2 Wed=3 Thu=4 Fri=5 Sat=6 > > REMark Step 0 - define the table of offsets: > LET T$="400351362402513345660122345567112344560012" > > REMark Step 1 - Process the Date-stamp: > LET e$=D$- 300 : v%=e$(1TO 4)DIV 4 : g%=T$(e$(1TO 2))*F% > > REMark Step 2 - compute the weekday-number: > LET w%=(v%+ D$(1TO 4)+ T$(D$(5TO 6))+ D$(7TO 8)- g%)MOD 7 > > This routine is valid for 3 different calendars as follows: > > Gregorian: from 15.oct.1582 to 28.feb.4300 > Julian: from 1.mar.1000 to 31.dec.4246 > quasi-Old-Style: circa 1100 to 02.sep.1752 > > For Old-Style dates: January & February are to be treated as months > 13 & 14 occurring at the end of the civil year, and 1.-24.mar as in > month 1 of the following year. > > -- > REFERENCES > > http://oz.ccnet.us/dayofweek/ > http://www.guernsey.net/~sgibbs/roman.html > http://de.wikipedia.org/wiki/Wochentagsberechnung#Jahrhundertziffer > >
Back to comp.sys.sinclair | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Sinclair mentioned on the Today programme on Radio 4 this morning lachman@ebony.ppc.ubc.ca (Milton Lachman) - 2011-04-12 18:45 +0000
Re: Sinclair mentioned on the Today programme on Radio 4 this morning "Brian Gaff" <Briang1@blueyonder.co.uk> - 2011-04-13 08:12 +0100
Re: Sinclair mentioned on the Today programme on Radio 4 this morning lachman@ebony.ppc.ubc.ca (Milton Lachman) - 2011-04-14 19:55 +0000
csiph-web