1. A Date Program

A while back someone ask how to convert a C program to Euphoria. I sent
out a piece of code that had no input routines but had some conversion
algorithms in it. As I am trying to learn the Euphoria language I wrote
the following.

-- ******************************************************************
-- Filename:           Date1a.ex
-- Author:             Larry D. Poos
-- Environment:        Euphoria
-- Date:               Thur 06-12-1997
-- Date Last Modified: Wed 07-02-1997
-- Remarks:
-- Calculate the Scalier date from a Gregorian Calendar date
-- or the Calendar date from a Scalier Date. Tested on calendar
-- dates 1/1/1 to 12/31/1000000000000.
-- Modifications:
--  Fixed bug in Scalier date algorithm that did not
--  adjust number for months past Feb causing error in converting
--  Scalier to MM/DD/YY form.
-- Future Additions:
--  Convert between Gregorian and Julian Calendar dates??
--  Add routine for Displaying DOW also
-- Input: User via Keyboard
-- Output: Screen Only
-- ******************************************************************

Anders Eurenius sent me some code, I want to thank him for his effort but
it has a minor conversion bug also. If he does not mind I may steal his
DOW algorithm code for a future project.

Here it is for your perusal and enjoyment. Remember it is beta and you
are on your own. I did have my other half run it and she did not break it
but that is no guarantee.

Larry D. Poos
-[USMC (Retar{bks}{bks}ired) Havelock, NC]-
- Programming and System Consultant, LTAD Enterprises -
e-mail: ldpoos at juno.com
temp e-mail: ldpoos at aol.com
Fido: 1:3629/101.6

>-=Encoded using Fire Frog's Base-64 Encoder=-<
>-=File was created on Wednesday, July 2, 1997=-<

--=====================

new topic     » topic index » view message » categorize

2. Re: A Date Program

> Anders Eurenius sent me some code, I want to thank him for his effort but
> it has a minor conversion bug also. If he does not mind I may steal his

I was kinda thinking that...
Go right on ahead, but it's "copyleft"!

> DOW algorithm code for a future project.
>
> Here it is for your perusal and enjoyment. Remember it is beta and you
> are on your own. I did have my other half run it and she did not break it
> but that is no guarantee.

It sounds pretty safe to me... blink

> Fido: 1:3629/101.6
Yes!

> YW5kbGUgQkMgZGF0ZXMgaGF2ZSBub3QgYmVlbiAiKQ0KCXB1dHMoU0NSRUVOLCJpbmNvcnBv
> cmF0ZWRcbiIpDQoJeVs\X|0/DQogICAgZWxzaWYgeVsyXTwxMDAgdGhlbg0KCXB1dHMoU0NS
> RUVOLCJcbklzIHRoaXM(@)()<ZGF0ZSBpbiB0aGUgMjB0aCBDZW50dXJ5PyBZL24uICIpDQo
> IGxvd2VyKHdhaXRfa2V/K|C\kpDQoJaWYgdz0xMjEgb3Igdz1SVE4gdGhlbg0KCSAgICB5Wz
> PXlbMl0rMTkwMA0KCWVuZCBpZg0KICAgIGVuZCBpZg0KICAgIHJldHVybiB5WzJdDQplbmQg

hehe... (look again...)

Anders

-------------------------------------------------------------------
Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793
Computer Science/Engineering student at the university of Umeaa
-------------------------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu