1. Calendar ?
- Posted by Wolf <wolfritz at KING.IGS.NET> Jul 29, 2003
- 467 views
Given a date:, ie: July 29, 2003... is there a simple way to calculate the day of the week: ie: ...it's Tuesday ! ( @#$% stupid MC146818 ) Wolf
2. Re: Calendar ?
- Posted by Robert Craig <rds at RapidEuphoria.com> Jul 29, 2003
- 461 views
Wolf wrote: > Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! Junko wrote a program for this a long time ago. It's in the Archive: http://www.rapideuphoria.com/daybdate.zip Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Calendar ?
- Posted by Lucius Hilley <l3euphoria at bellsouth.net> Jul 29, 2003
- 444 views
This has definately been done. Someone should give you the solution soon. I don't have it at hand right now though. Elliott, Robsz, Bensler, jbrown, one of you care to steal it form a copy of my irc2html.exe Remember it creates that index.html page. In doing so it computes the day of the week based on the date. Lucius L. Hilley III ----- Original Message ----- From: "Wolf" <wolfritz at KING.IGS.NET> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, July 29, 2003 01:16 PM Subject: Calendar ? > > > Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! > > ( @#$% stupid MC146818 ) > Wolf > > --^---------------------------------------------------------------- > This email was sent to: l3euphoria at bellsouth.net > > > TOPICA - Start your own email discussion group. FREE! > >
4. Re: Calendar ?
- Posted by "C. K. Lester" <cklester at yahoo.com> Jul 29, 2003
- 443 views
> Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! > > ( @#$% stupid MC146818 ) Here's some interesting, fun, and useful links: http://www.terra.es/personal2/grimmer/ http://www.fos.su.se/physical/stefan/perl/scripts/date_and_time/zeller.date. pl http://quasar.as.utexas.edu/BillInfo/doomsday.html http://www.cs.princeton.edu/~rpeterso/date_trick.html http://www.sislands.com/jscript/week3/dayofwk.htm http://rudy.ca/doomsday.html http://jonathan.rawle.org/hyperpedia/daycal.htm Some of them duplicate the "Doomsday" calculation algorithm. Ah well! Let me know which one of the above is best... :) Thanks, ck
5. Re: Calendar ?
- Posted by rolf at rschr.de Jul 29, 2003
- 438 views
This is a multi-part message in MIME format. --------------59C3BA08093E8B419DE677BA Wolf wrote: > > Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! > Hi Wolf, I attached the file 'datetime.zip', it contains 'datetime.e' which has several date conversion functions and also mum_of_weekday(). Look into the test program 'datetime.ex'. Have a nice day, Rolf --------------59C3BA08093E8B419DE677BA Content-Type: application/x-zip-compressed; name="DATETIME.zip"
6. Re: Calendar ?
- Posted by "C. K. Lester" <cklester at yahoo.com> Jul 29, 2003
- 436 views
> Wolf wrote: > > Given a date:, ie: > > July 29, 2003... > > is there a simple way to calculate the day of the week: ie: > > ...it's Tuesday ! > > Junko wrote a program for this a long time ago. > It's in the Archive: > > http://www.rapideuphoria.com/daybdate.zip I suspected there was probably some code already written. Next time I'll check the library first. ;)
7. Re: Calendar ?
- Posted by Wolf <wolfritz at KING.IGS.NET> Jul 29, 2003
- 433 views
OK, thanks to all! Now just gotta convert one of these Doomsday/Gregorian algo's to 8 bit 6803/6502'ish code, .. ignoring the Y2K100 bug, of course Wolf
8. Re: Calendar ?
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 29, 2003
- 439 views
On Tue, 29 Jul 2003 13:16:47 -0400, Wolf <wolfritz at KING.IGS.NET> wrote: >Given a date:, ie: >July 29, 2003... >is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! > Try this, though I have suspicions it won't work for 2000 and before: ---- Tomohiko Sakamoto=20 constant t=3D{ 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 } function dow(integer d, integer m, integer y) integer k y -=3D m < 3 k=3Dfloor(y/100) return remainder(y+floor((y+k)/4)-k+t[m]+d,7) end function Pete
9. Re: Calendar ?
- Posted by "C. K. Lester" <cklester at yahoo.com> Jul 29, 2003
- 460 views
Wolf wrote: > Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! Junko wrote a program for this a long time ago. It's in the Archive: http://www.rapideuphoria.com/daybdate.zip I suspected there was probably some code already written. Next time I'll check the library first. ;) -- Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
10. Re: Calendar ?
- Posted by gertie at visionsix.com Jul 29, 2003
- 458 views
On 29 Jul 2003, at 13:16, Wolf wrote: > ( @#$% stupid MC146818 ) Try a DS12885 ? Kat
11. Re: Calendar ?
- Posted by gertie at visionsix.com Jul 29, 2003
- 432 views
On 29 Jul 2003, at 14:35, Wolf wrote: > > > OK, thanks to all! > Now just gotta convert one of these Doomsday/Gregorian algo's to 8 bit > 6803/6502'ish code, .. ignoring the Y2K100 bug, of course Since there are C64 programs that read and use msdos-formatted harddrives, i imagine they handle the dates that M$/dos/windoze stamped them with. Check them out. The C64 is 6510, 6502 core. Kat
12. Re: Calendar ?
- Posted by "Carl W." <euphoria at cyreksoft.yorks.com> Jul 30, 2003
- 445 views
Wolf wrote: > Given a date:, ie: > July 29, 2003... > is there a simple way to calculate the day of the week: ie: > ...it's Tuesday ! Junko Miura's day of week function is probably the way to go if all you want is that one function. (I searched on 'Junko week' in the archive and it came out top.) For overkill, there's my library (Rolf Schroeder already posted his datetime.e, so perhaps me posting mine is redundant; But I can't resist a plug :) ) and docs at http://www.cyreksoft.yorks.com/euphoria/ For those griping about the fact a function returns a day of week for an invalid date (like Feb. 30th) there's a validDayOfWeek() function that returns -1 when the date is invalid. Carl -- [ Carl R White == aka () = The Domain of Cyrek = ] [ Cyrek the Illogical /\ www.cyreksoft.yorks.com ]