Qbasicnews.com

QBasic => QB Discussion & Programming Help => Topic started by: Moneo on June 12, 2003, 07:01:47 PM



Title: Easter Sunday computation
Post by: Moneo on June 12, 2003, 07:01:47 PM
Is anyone interested in appproximately 30 lines of straight-line code (plus comments) to compute the date (YYYYMMDD) of  Easter Sunday in any given year?


Title: An unusual request.
Post by: Agamemnus on June 12, 2003, 07:34:23 PM
However I don't have any idea which Sunday of which month Easter is on.......


Title: Easter Sunday computation
Post by: oracle on June 12, 2003, 07:40:56 PM
Is this for homework? Or have you done it? Though it would fit in well.

http://www.hourworld.com/easter.htm Gregorian or Julian?


Title: Easter Sunday computation
Post by: Antoni Gual on June 12, 2003, 08:14:29 PM
So much fuss to calculate the date of the first sunday after the first full moon after the spring equinox????  :D

Well, if you think about it, it must be a very serious algorithm.  So congratulations! :o

And yes, I would be interested in seeing the code.  :bounce:


Title: Easter Sunday computation
Post by: Agamemnus on June 12, 2003, 08:36:28 PM
cool beans....

I just made mine...

It's 23 lines (with dims, cls, print, and input)


Title: Re: An unusual request (Easter Sunday calculation)
Post by: Moneo on June 12, 2003, 09:16:08 PM
Quote from: "Agamemnus"
However I don't have any idea which Sunday of which month Easter is on.......


Easter Sunday is a moveable feast which falls in March or April. By definition, except for Orthodox churches, it is the first Sunday after the date of the first full moon that occurs on or after March 21st.

The programming problem is computing when this first full moon occurs. Why would you need this?
1) Let's say you're planning to go on a trip to Rio de Janeiro for the carnival festival in 2006 and you can't find a calendar for 2006.
Carnival in Rio begins on the weekend before Ash Wednesday. If you know when Easter falls that year, you can figure out easily when Ash Wednesday falls.
2) Let's say you're programming a payroll and are given a list of company holidays which includes Good Friday. If the program can't figure out when Easter is, then it can't figure Good Friday. Without the Easter logic, every year someone would have to remember to set the date for the Good Friday holiday.
3) I'm certain there are many other uses.

So, back to my original question: Are you interested in the routine? Yes or no.


Title: Easter Sunday computation
Post by: Moneo on June 12, 2003, 09:35:37 PM
Quote from: "oracle"
Is this for homework? Or have you done it? Though it would fit in well.

http://www.hourworld.com/easter.htm Gregorian or Julian?

**************************************************
The mentioned website has the specifications for a computation of Easter taken from Butcher's Ecclesiastical Calandar of 1876. It might be good, but I wouldn´t like to spend the time debugging the programmed interpretation of these ancient specifications.

The specifications that I used were written by Donald E. Knuth in his renowned series of books called "The Art of Programming", specifically from the book "Fundamental Algorithms". Look him up. His algorithm were designed to be programmed.

Are you interested in the code for this version? Yes or no?


Title: Easter Sunday computation
Post by: Zack on June 12, 2003, 09:40:44 PM
I've been exchanging emails with Moneo for a few days. This guy is a QB genius. :wink:


Title: Easter Sunday computation
Post by: Agamemnus on June 12, 2003, 09:44:07 PM
what I saw on the website weren't specifications but ALMOST code.

Had to replace x with * and set all vars to integers..

2003 = 4, 20.

Code:

CLS
DIM year AS INTEGER, a AS INTEGER, b AS INTEGER, c AS INTEGER
DIM d as integer, e AS INTEGER, f AS INTEGER, g AS INTEGER
DIM h AS INTEGER, i AS INTEGER, j AS INTEGER, k AS INTEGER,
DIM l AS INTEGER, m AS INTEGER, n AS INTEGER, o AS INTEGER

INPUT year

a = year MOD 19
b = year \ 100
c = year MOD 100
d = b \ 4
e = b MOD 4
f = (b + 8) \ 25
g = (b - f + 1) \ 3
h = ((19 * a) + b - d - g + 15) MOD 30
i = c \ 4
j = c MOD 4
k = (32 + 2 * e + 2 * i - h - j) MOD 7
l = (a + 11 * h + 22 * k) \ 451
m = (h + k + 7 * l + 114)
n = m \ 31
o = m MOD 31 + 1
PRINT n; o


Hmmmmmmmmm...... "Mexico QB Central" or "QB Mexico Central"


Title: Easter Sunday computation
Post by: whitetiger0990 on June 12, 2003, 10:03:52 PM
Code:
CLS
INPUT year
a = year MOD 19
b = INT(year / 100)
c = year MOD 100
d = INT(b / 4)
e = b MOD 4
f = INT((b + 8) / 25)
g = INT((b - f + 1) / 3)
h = ((19 * a) + b - d - g + 15) MOD 30
i = INT(c / 4)
j = c MOD 4
k = (32 + (2 * e) + (2 * i) - h - j) MOD 7
l = INT((a + (11 * h) + (22 * k)) / 451)
m = INT((h + k - (7 * l) + 114) / 31)
n = 1 + ((h + k - (7 * l) + 114) MOD 31)
PRINT USING "####:##:##"; year; m; n


All i did was this.


Title: Easter Sunday computation
Post by: Moneo on June 12, 2003, 10:50:01 PM
Quote from: "Agamemnus"
what I saw on the website weren't specifications but ALMOST code.

Had to replace x with * and set all vars to integers..

2003 = 4, 20.

Code:

CLS
DIM year AS INTEGER, a AS INTEGER, b AS INTEGER, c AS INTEGER
DIM d as integer, e AS INTEGER, f AS INTEGER, g AS INTEGER
DIM h AS INTEGER, i AS INTEGER, j AS INTEGER, k AS INTEGER,
DIM l AS INTEGER, m AS INTEGER, n AS INTEGER, o AS INTEGER

INPUT year

a = year MOD 19
b = year \ 100
c = year MOD 100
d = b \ 4
e = b MOD 4
f = (b + 8) \ 25
g = (b - f + 1) \ 3
h = ((19 * a) + b - d - g + 15) MOD 30
i = c \ 4
j = c MOD 4
k = (32 + 2 * e + 2 * i - h - j) MOD 7
l = (a + 11 * h + 22 * k) \ 451
m = (h + k + 7 * l + 114)
n = m \ 31
o = m MOD 31 + 1
PRINT n; o


Hmmmmmmmmm...... "Mexico QB Central" or "QB Mexico Central"

**************************************************
Ok, you now have some virgin code for an intricate problem. Get youself a copy of The Farmer's Almanac, which has a long list of dates for Easter Sunday, and check out about 50 random years, going back about 200 years and forward for about 200 years. Make sure to select a good number of leap years. When you've done this, and the dates check out exactly, you can consider that the routine works in general. When you get to this point, let me have a crack at testing it.
P.S. While testing my version, I discovered that the MOD instruction in QB does not work on negative number. I had to do this  function the long way.
Have fun!
P.S. This "QB Central" guy now lives in Mexico City but was born and learned how to program in New York, New York.
*****************************************************


Title: Easter Sunday computation
Post by: oracle on June 13, 2003, 03:14:00 AM
Mr moneo, you may find turning BBCode on a good idea, because your posts, no matter how insightful, look frighteningly ugly.

Quote from: "moneo"
P.S. This "QB Central" guy now lives in Mexico City but was born and learned how to program in New York, New York.


Only an american could write new york twice like the rest of the world was ignorant  :P


Title: Easter Sunday computation
Post by: Agamemnus on June 13, 2003, 09:28:52 AM
There is Buffalo, New York, too......

Well, the website seems like it's good..

Anyways, you put [/quote] instead of [/code]......


Title: Easter Sunday computation
Post by: Moneo on June 13, 2003, 02:33:08 PM
Quote from: "oracle"
Mr moneo, you may find turning BBCode on a good idea, because your posts, no matter how insightful, look frighteningly ugly.

Quote from: "moneo"
P.S. This "QB Central" guy now lives in Mexico City but was born and learned how to program in New York, New York.


Only an american could write new york twice like the rest of the world was ignorant  :P

**************************************************
Oracle, Thanks for your personal comments:
1) I joined this forum only yesterday and don't know what BBCode is, nor where to read about it --- please advise.
2) I said New York, New York to indicate New York City, specifically Manhattan, just like the song "New York New York". Ok?
**************************************************


Title: Easter Sunday computation
Post by: pr0gger on June 13, 2003, 02:38:36 PM
Moneo-- BBCode is the code used to format text in this forum.  They're the little tags like [url],
Quote
, etc.

To enable it when you post, look at the first checkbox right under the textbox where you enter text.  If there's a check in it, uncheck it.

More about BBCode:

http://forum.qbasicnews.com/faq.php?mode=bbcode


Title: Reply to Progger re BBCode
Post by: Moneo on June 13, 2003, 02:54:18 PM
Progger: Thanks for the help re BBCode. I'll try it on my next coding example.


Title: Easter Sunday computation
Post by: whitetiger0990 on June 13, 2003, 02:58:59 PM
it also fixes the messed up quoteing


Title: Easter Sunday computation
Post by: Mango on June 13, 2003, 03:04:52 PM
Agamemnus,...you can save some typing if you replace this with:

defint a-z

since *all* your variables are intergers...cheers

Code:

CLS
DIM year AS INTEGER, a AS INTEGER, b AS INTEGER, c AS INTEGER
DIM d as integer, e AS INTEGER, f AS INTEGER, g AS INTEGER
DIM h AS INTEGER, i AS INTEGER, j AS INTEGER, k AS INTEGER,
DIM l AS INTEGER, m AS INTEGER, n AS INTEGER, o AS INTEGER


Title: Reply to Agamemnus re Integers
Post by: Moneo on June 13, 2003, 03:37:00 PM
During my testing of a similar algorithm, I discovereed that ALL the variables dar to be defined as LONG, otherwise it didn't work for large year numbers. So, the original definitions should be changed from INTERGER to LONG. It's like chicken soup --- it wouldn't hurt.


Title: Easter Sunday computation
Post by: Agamemnus on June 13, 2003, 04:18:36 PM
oh... but then what about really REALLY large years.......  :lol:


Title: Reply to Agamemnus re really large numbers
Post by: Moneo on June 13, 2003, 08:16:12 PM
The algorithm that I have by Knuth states that it will work up to the year 99999. When I implemented it, I considered that a max of year 9999 would be enough, especially since most date handling programs only handle 4 digit years.

Even though a max of 9999 fits into an integer, I had problems with the arithmetic of the algorithm when testing with larger numbers.  I can't remember whether "large" meant over 6000 or over 8000. I just used LONG and the problem went away.

Let's not forget what I mentioned about MOD not working for negative numbers. There are instances when the arithmetic produces an intermediate result that's negative.
For example, if you intend to do the following on the intermediate value called ZZZ:

RESULT = ZZZ MOD 30

If you think ZZZ could be negative, then I sugest taking the MOD as follows:

RESULT = ZZZ-30*INT(ZZZ/30)


Title: Easter Sunday computation
Post by: Agamemnus on June 13, 2003, 08:21:48 PM
yeah..


Title: Re: Computation of Easter - Moneo's version
Post by: Moneo on June 14, 2003, 10:47:45 PM
Although there was only one person, Antoni, who wanted to see the code, I'm going to list it here to relieve you guys from having to debug your other versions.

Code:

REM **************************************************************************
REM ***** COMPUTATION OF EASTER **********************************************
REM **************************************************************************

DEFINT A-Z

DECLARE FUNCTION Easter$     (YYYY)

DIM YYYY AS INTEGER  'Value of the given 4 digit year.

***** your program code here to get YYYY *****

'* Compute date of Easter Sunday for the year YYYY.

EasterSunday$ = EASTER(YYYY)

***** your program code here to display EasterSunday$ *****

REM **************************************************************************

END

REM **************************************************************************
REM *****   F U N C T I O N S   **********************************************
REM **************************************************************************

' ======================= EASTER ============================================
' Computes date of Easter Sunday for input year.
' Acknowledgement and thanks to Donald E. Knuth.
' Ref: The Art of Computer Programming, Volume 1 Fundamental Algorithms, 1.3.2.
' Knuth's algorithm was implemented as such, with no enhancements.
' According to Knuth, this logic will work up to a 5 digit year.
' This logic has been tested up to the year 9999.
' The resultant Easter dates have been verified for years 1901 through 2100.
' ===========================================================================

FUNCTION Easter$ (YYYY) STATIC

REM *
REM *** COMPUTE DATE OF EASTER SUNDAY FOR GIVEN YEAR.
REM *
REM *  INPUT: YYYY assumed to be a 4 digit year (max 9999)
REM *
REM * OUTPUT: a date string formatted as YYYYMMDD.
REM *
REM *  USAGE: E$ = EASTER$(YYYY)

'* All variables are set to LONG to handle arithmetic
'* for large year numbers.

DIM Y    AS LONG  
DIM G    AS LONG
DIM C    AS LONG
DIM X    AS LONG
DIM Z    AS LONG
DIM D    AS LONG
DIM E    AS LONG
DIM TEMP AS LONG
DIM N    AS LONG


Y = YYYY   '* Force year as long

           '* Compute "golden number" of the year in the 19-year Metonic cycle.
G = (Y mod 19) + 1
           '* Compute the Century. Note: When Y is not multiple of 100,
           '*                            C is the century number.
C = INT(Y/100) + 1
           '* Corrections:
           '* X is number of years, like 1900, in which leap year was dropped
           '*                       in order to keep in step with the sun.
           '* Z is special correction to sync Easter with the moon's orbit.
X = INT(3*C/4) - 12
Z = INT((8*C + 5) / 25) - 5
           '* Find Sunday
D = INT(5*Y/4) - X - 10
           '* Compute so-called Epact, which specifies when a full moon occurs.
TEMP = (11*G + 20 + Z - X)
E    = TEMP-30*INT(TEMP/30)   'Same as TEMP MOD 30 but works for negative TEMP.
if (E=25 and G>11) or E=24 then E=E+1
           '* Find full moon. Easter is the 1st Sunday after the 1st full moon
           '*                 which occurs on or after March 21st.
           '*                 This is a "calendar moon" not actual moon.
N = 44 - E
if N<21 then N=N+30
           '* Advance to Sunday.
N = N + 7 - ( (D+N) mod 7 )
           '* Get Month.
           '* N is the day.
if N>31 then
   zmm=4              'April
   N=N-31
else
   zmm=3              'March
end if
          '* Pack Easter date as YYYYMMDD
Easter$=FILLSTRING$((Y),4)+FILLSTRING$((zmm),2)+FILLSTRING$((N),2)

END FUNCTION
' ============================================================================

' ========================= FILLSTRING =============================
' Converts a value to string of specified length with leading zeros.
' ==================================================================
FUNCTION FillString$ (V#,ZL) STATIC

  FILLSTRING$=right$(STRING$(ZL,"0")+MID$(STR$(V#),2),ZL)
END FUNCTION
' ===================================================================

Note: This Easter function has been working for years. If it gives you any trouble at all, let me know.
*****


Title: Code for Easter is missing a DECLARE
Post by: Moneo on June 15, 2003, 02:10:19 PM
Sorry, the code for Easter computation in my previous post is missing the following DECLARE statement up front:

Code:

DECLARE FUNCTION FillString$ (V#,ZL)

*****


Title: Easter Sunday computation
Post by: oracle on June 16, 2003, 05:20:26 AM
Humm... this may be a silly question, but why did you DEFINT and then make everything LONG?


Title: Reply to Oracle re DEFINT
Post by: Moneo on June 16, 2003, 10:50:23 AM
Mostly force of habit, plus the fact that I do have some code of my own where it says "put your own code here..."
Have you tried the routine yet?
*****


Title: Easter Sunday computation
Post by: Antoni Gual on June 16, 2003, 06:42:43 PM
So.. Rio de Janeiro's carnival is how many days before Easter sunday? :D


Title: Easter Sunday computation
Post by: toonski84 on June 16, 2003, 06:52:36 PM
by that smiley, i take it you're kidding, but for those who dont know, Ash Wednesday marks the first day of Lent, which in Catholicism is a period of the 40 days before Easter, skipping Sundays.


Title: Reply re Ash Wednesday and Rio's carnival
Post by: Moneo on June 16, 2003, 08:26:40 PM
Lent begins on Ash Wednesday for 40 days and ends on Palm Sunday.
Rio's carnival begins on the weekend before Ash Wednesday, and ends the day before Ash Wednesday known in Spanish as martes de carnaval (carnival Tuesday).

So working backwards from Easter........................ 20-Apr-2003
Palm Sunday is the previous Sunday..................... 13-Apr-2003
Ash Wednesday is 39 days before Palm Sunday... 05-Mar-2003
*****


Title: Reply to Toonski84 re 40 days before Easter
Post by: Moneo on June 16, 2003, 08:36:21 PM
I wonder where you got the formula about Lent being 40 days before Easter skipping Sundays.
That just doesn't work.

In addition, Holy Week, the week immediately before Easter Sunday, is not part of Lent. Lent ends on Palm Sunday. Lot's of people do confuse this.
*****


Title: Easter Sunday computation
Post by: oracle on June 17, 2003, 02:47:24 AM
I haven't tried the routine, running Linux for my QB most of the time and all, and I simply don't have enough time (unless you would like me to host your routine on QBNZ (http://qbnz.com/)...


Title: Easter Sunday computation
Post by: toonski84 on June 17, 2003, 03:02:21 AM
My bad, my bad.  I thought it ended on Palm Sunday, but I wasnt sure (i stopped giving up things when I was 10, yeah, i know i'm going to hell) so I checked this( http://www.kencollins.com/holy-04.htm ) website, which is apparently full of crap.  But my mistake :)


Title: Easter Sunday computation
Post by: Antoni Gual on June 17, 2003, 10:11:49 AM
Spanish carnival starts on Thursday before ash Wednesday, in Barcelona we call it Dijous Gras (greasy Thursday)  it's the day schoolchildren celebrate their carnival, and it's a tradition to eat omelettes or sausages with egg added.
Tuesday before Ash Wednesday it's the Entierro de la Sardina, (Burial of the Sardine), a simbol of the end of the carnival and the start of the fast.

I have found a well documented page about Easter related feasts (you can start 60 days before and end 60 days after!!) It includes an applet calculating Easter date.
http:////www.smart.net/~mmontes/ec-cal.html


Title: Easter Sunday computation
Post by: Moneo on June 17, 2003, 01:22:57 PM
Quote from: "toonski84"
My bad, my bad.  I thought it ended on Palm Sunday, but I wasnt sure (i stopped giving up things when I was 10, yeah, i know i'm going to hell) so I checked this( http://www.kencollins.com/holy-04.htm ) website, which is apparently full of crap.  But my mistake :)


I checked out the site of ths Rev. Collins. He's got a few thinks messed up, so I wrote him an email.

My 20 year old son said to me recently "Be careful, the Internet is not a source of information".
*****


Title: Reply to Antoni re his info on Easter and related.
Post by: Moneo on June 17, 2003, 01:31:11 PM
Yes, you will find that the celebartion of carnival varies from place to place. Some move the date drastically so as to have their very own carnival which does not coincide with others.

I checked out the site you provided. It's very good altough some of the explanations are a bit verbose. The calculation of Easter and related dates looks good. I verified a few dates and they coincide.

Thanks again, Antoni.
*****


Title: More info for Antoni:
Post by: Moneo on June 17, 2003, 10:16:39 PM
I downloaded 3 algorithms from the mmontes site you provided. Then I ran them in parallel with my version inside the same program, comparing every Easter calculated between 1583 and 9999. These are the results:

MONTES version (which is taken from Mallen's table approach): Matched my results 100%, but only ran it up to 4099 'cause that's what the specs said.

BUTCHER version ( I think someone on the forum had this): Matched my results 100%.

OUDIN version: totally wrong results.

I hope this gives my version a vote of confidence.
*****


Title: Easter Sunday computation
Post by: oracle on June 18, 2003, 02:22:54 AM
Hey Mr Moneo... there is an 'edit' button up the top right of your post, ok? Triple posts are not cool  :P


Title: Reply and apology to Toonski84 re the end of Lent.
Post by: Moneo on June 18, 2003, 03:31:28 PM
Toonski,
It turns out you were right, Lent begins on Ash Wednesday and goes for 40 days excluding Sundays. This makes the actual ending date a little nebulous, and there are many disagreements, but that's the way it is.
P.S. I also apologized to Rev. Collins.

However, for an arithmetic method of computing the date of Ash Wednesday, my previous formula still stands, which is:
a) The date of Palm Sunday minus 39 days, or
b) The date of Easter minus 46 days.
*****


Title: Reply to Oracle re "edit" and triple posts
Post by: Moneo on June 18, 2003, 03:39:22 PM
Quote from: "oracle"
Hey Mr Moneo... there is an 'edit' button up the top right of your post, ok? Triple posts are not cool  :P


Sorry, but I dont know what the "edit" button is. Tell me when and how I should use it.

Yes I did 3 posts in a row. I was answering specific posts of other people. How should I do this in the future?
*****

***testing*** ------------- Thanks, Agamemnus!


Title: Easter Sunday computation
Post by: Agamemnus on June 18, 2003, 04:13:14 PM
like this:
Mr Bla1: blablabla.
Mr Bla2: blAblabla
Mr bla 3: bla....

On the upper right of each post there is a quote, an edit button and sometimes a delete button. (X) You can only edit when you're signed in..


Title: Easter Sunday computation
Post by: oracle on June 19, 2003, 06:52:25 PM
That's the one. There is also an FAQ button up the top of your screen, to the left of Search and above Profile (NOT the underlined one). That should help.

Sorry if I sound a little rude, Mr Moneo...


Title: Reply to Oracle
Post by: Moneo on June 19, 2003, 10:44:38 PM
No problem. Actually, thanks for your help.
*****


Title: Wrapup on this topic
Post by: Moneo on June 20, 2003, 03:36:08 PM
Well friends, I think we have pretty much gone as far with this topic as we are apparently going to get. No sense in beating a dead horse.

I personally have acquired additional knowledge on the Easter date subject, just by having to answer some of your questions, and reviewing the websites that you provided.

I get the impression that most of you have never actually tested the coded algorithm, and several of you got into this topic just to kibitz.

You might consider looking into this subject further. The calculation of Easter is an issue that has concerned mathematicians and astronomers for more than 500 years.  Beware of algorithms that appear all over the place on the internet. Contrary to what you will see mentioned, there is no definitive solution. Carefully take into consideration the source of the information. Some sites use well accepted algorithms, but their particular implementation is full of bugs. If you find one you like, check it out first. Run it in parallel with at least 2 others to make sure that it gives the same Easter date for the years 1583-9999, or at least 1583-4099.  Another source of Easter dates from 1901-2100 is the World Almanac.

If you have any additional comments on the subject, please write me a PM.

Thanks.
*****


Title: Easter Sunday computation
Post by: HystericPoison on June 21, 2003, 08:23:01 PM
Quote from: "toonski84"
My bad, my bad.  I thought it ended on Palm Sunday, but I wasnt sure (i stopped giving up things when I was 10, yeah, i know i'm going to hell) so I checked this( http://www.kencollins.com/holy-04.htm ) website, which is apparently full of crap.  But my mistake :)


we were supposed to give something up?

good thing im atheist   :evil:


Title: Easter Sunday computation
Post by: Ninkazu on June 21, 2003, 08:46:44 PM
Quote from: "HystericPoison"
good thing im atheist   :evil:


(http://forum.venosoft.com/html/emoticons/headbang.gif)


Title: Easter Sunday computation
Post by: na_th_an on June 21, 2003, 08:58:51 PM
Hmmm... Being atheist is the same as having a belief. You can't demonstrate god's existence, say the atheists. But you can't demonstrate his non existence, either. What's the point?


Title: Easter Sunday computation
Post by: toonski84 on June 21, 2003, 09:33:06 PM
i gotta side with nate here.  to believe you know what's outside the box is a religion any way you put it.


Title: Food for thought: Unification of the Easter date
Post by: Moneo on June 22, 2003, 02:31:28 PM
I read an article yesterday that said that some banking association of the European Community is pushing to standardize the computation of the Easter date. This is because different regions and countries of the Community, although Christian, now have different dates for Easter. This causes banking problems because some banks are closed Holy Thursday and Friday, while others are open, and vice versa for different Easter dates.

If this standardization comes about, all the algorithms, which don't coincide with the new standard, that have been developed in the last 500 years for Western and Eastern Christian Churches, will become obsolete, along with the computer programs that use them. What a mess! Perhaps then we will have several Easter dates, one for the European Community, and the same two as today (Western and Eastern) for the rest of the non-European Christian world.

What do you think?
Please don't answer stuff like "I'm an athiest, so I don't care".
*****


Title: Easter Sunday computation
Post by: toonski84 on June 22, 2003, 03:19:48 PM
Being the first ones to celebrate it, i'd go with the algorithm the Roman Catholic church uses.  If not, standardize the sunday after passover (makes enough sense, right?).


Title: To Toonski:
Post by: Moneo on June 22, 2003, 05:53:38 PM
I agree with you. The original Holy Week and Easter occurred during Passover. If there is going to be a new standard, then Easter and Passover should be made to coincide.
*****


Title: Easter Sunday computation
Post by: Ninkazu on June 22, 2003, 06:51:20 PM
Quote from: "na_th_an"
Hmmm... Being atheist is the same as having a belief. You can't demonstrate god's existence, say the atheists. But you can't demonstrate his non existence, either. What's the point?


True, many atheists believe there is no god or that any religion is right. But, to define atheism, it is purely the absense of theism (religion) therefore "atheism". Now, I have a strong idea towards that fact there is no god, but I still hold true that having a belief is a bad thing. An idea can be changed easier than a belief.

Now then, to the matter of "prove my god doesn't exist." The thing is, I don't have to. If I had to prove every god that people may believe in doesn't exist, I'd be wasting my life. Say for instance I pray to the food god, Masticatibum, for all my meals to be delicious and hearty. Say I explain my beliefs to someone like you. Do you instantly believe in this new god, or do you think it ludicrous? I don't care if you say "whatever you believe is none of my business" but tell me... do you think it ludicrous? Now suppose we were being completely honest with each other and you told me such a belief was ludicrous. Now, I return with "Prove he doesn't exist." Can you? No. Is there a real reason to? Not unless you want to save this person from total ignorance.

Now I get to my next point, what is all this "saving" crap I always hear from Christians? Why must you "save" my "soul"? I somewhat feel the same way about you, only I wish to save you from crazy beliefs of a man in the clouds and for you to think for yourself and live by no boundaries, which the Christians mean to "save" you by making you live your life by the teachings of a 2000-year-old book written by people with no science or anything of the sort... just followers of a guy with ideas about how life should be.

The one thing that makes Jesus different from Buddha and Muhammad is that Jesus called himself the "son of god" and even "god" himself. Um.... no... no, not really. The Bible was actually mistranslated from "young woman Mary" to "virgin Mary" and thus comes all that bull crap. Also, have you noticed that all the old relgions (Christianity, Islam, Mormonism) are "started" by the "angel" Gabriel? Who's got it right? And who are you to say who's wrong?

The point is, none of them are right, although they may have the basic ideas toward compassion and such, but of course EVERYONE WENT TOO FAR. There's actually a godhatesfags.com, did you know that? Just because some guy writing for the Bible had a grudge against homosexuals, he decided to put it in as "God's word". You may think, "oh, but it IS God's word!" Hmmmm, nope, would you think your god would also compare human penises to that of a donkey's in pornographic nature? No, the authors of the Bible are just sheep fuck ers.

Now on into Buddha. Buddha didn't call himself God, nor a messenger of God, or any other bull crap like that. He meditated for weeks at a time, and when he knew he was close to enlightenment, he meditated in the forest under a bodi tree (or something like that). He meditates for weeks on end and became enlightened. What is enlightenment? Some people think Buddhists are arrogant for saying that they've been enlightened. After all, it does seem strange that you are giving yourself the knowledge instead of being taught it. The fact is, if you're taught something by someone else, you haven't learned it. You have just memorized their bit of knowledge. As Buddha once said, "If you must ask a question, you will never know the answer."

Am I a Buddhist? No. Do I follow some of his teachings? It depends. If you think following a certain lifestyle similar to one taught of Buddha is living the teachings of Buddha itself (yes, ITself), then yes, you could even say that about Christianity in some parts.

Christianity has the basic morals, and then the strange morals, and then the killing and torturing and slaughter of infants... morals.
Buddhism has basically the same basic morals, then it teaches that suffering comes from desire, and then there are the fundamentalist Buddhists (whom aren't many. The only ones I know of are the ones who killed the Christians in... Sri Lanke was it? Can't remember).

Really, humans know for themselves the basic morals, but do tend to break them because of greed and lust. The others were created by the human mind to have more control over the people whom believed in its teachings.

Christianity has actually changed the definition of hell in the past few years. No longer is it boiling brimstone and rain of fire, but merely the "absence of God". Wow... it seems they want to look better on the popularity charts, but the thing is, their bible says that hell is boiling brimstone and all that, so why change it? Because the bible is actually a book of horror stories with supposed "morals" to them, but with the offspring of the baby boomers being such pussies, they've had to "tone it down".


Title: Easter Sunday computation
Post by: na_th_an on June 22, 2003, 07:42:48 PM
Nice thoughts :) I love this.

Quote from: "Ninkazu"
True, many atheists believe there is no god or that any religion is right. But, to define atheism, it is purely the absense of theism (religion) therefore "atheism". Now, I have a strong idea towards that fact there is no god, but I still hold true that having a belief is a bad thing. An idea can be changed easier than a belief.


That makes agnosticism different from atheism. Your definition is agnostic, not atheist. AFAIK, atheists deny god's existence. That's stupid, IMHO (but respectable, please, don't misunderstand me). Agnostics just say that they have no prove. Both don't believe in God, but Agnostics give room for doubt. That is more intelligent, IMHO.

Quote
Now then, to the matter of "prove my god doesn't exist." The thing is, I don't have to.


Of course you don't have to, but if you wanna make yourself some credit, you should back your words with facts. (Replace "you" with whatever ;) ). Atheists say something really hard, like "God doesn't exist", but they can't "back" it.

Quote
I don't care if you say "whatever you believe is none of my business" but tell me... do you think it ludicrous?


Of course I think it is ludicrous, but I would respect your beliefs. I can't disprove its existence, either. I wouldn't believe in it, also ;)

Quote
Now I get to my next point, what is all this "saving" crap I always hear from Christians? Why must you "save" my "soul"? I somewhat feel the same way about you, only I wish to save you from crazy beliefs of a man in the clouds and for you to think for yourself and live by no boundaries, which the Christians mean to "save" you by making you live your life by the teachings of a 2000-year-old book written by people with no science or anything of the sort... just followers of a guy with ideas about how life should be.


I'm with you in this points. I don't wanna be saved by anyone. IMHO, you can be a Christian without believe in God. If you just follow what Jesus said, you'll be a follower, so you'll be a christian. And I think that Jesus teachings were really cool. Forget all those miracles and epic stuff, and all those misinterpretations, and only think in the main message: "Respect. Give. Love. Coexist." ... Is that any bad?

Quote
[...] Also, have you noticed that all the old relgions (Christianity, Islam, Mormonism) are "started" by the "angel" Gabriel? Who's got it right? And who are you to say who's wrong?


None of them are wrong. Many muslims cellebrate Christmas. Mr. Arafat does, for example. Islam does not deny Christianism. Fights between different religions don't come from the religious matters themselves. Think about it: always money, power and envy were involved. All those "holy wars" were just for money and lands, not for God. God was just an excuse. It is the evil in humanity which caused them, not the religions.

Quote
The point is, none of them are right, although they may have the basic ideas toward compassion and such, but of course EVERYONE WENT TOO FAR. There's actually a godhatesfags.com, did you know that? Just because some guy writing for the Bible had a grudge against homosexuals, he decided to put it in as "God's word". You may think, "oh, but it IS God's word!" Hmmmm, nope, would you think your god would also compare human penises to that of a donkey's in pornographic nature? No, the authors of the Bible are just sheep f**k ers.


The bible was written 3000 years ago, even more. It is normal that it says what it says. What isn't normal is that their followers still apply those outdated teachings as they were the main Truth. I'm with you in this one.

Quote
Now on into Buddha.[...]

Am I a Buddhist? No. Do I follow some of his teachings? It depends. If you think following a certain lifestyle similar to one taught of Buddha is living the teachings of Buddha itself (yes, ITself), then yes, you could even say that about Christianity in some parts.


Buddhism is more a way of life to me. I concur with many of its teachings. Also, I'd call Buddha a HE, not an IT, 'cause he actually existed and he was a man :???:

Quote
Really, humans know for themselves the basic morals, but do tend to break them because of greed and lust. The others were created by the human mind to have more control over the people whom believed in its teachings.


Think about the time when relligions were created (yes, "created" -> may God exist or don't exist, but relligions are a man's act). It all makes sense. It's easier to convince people not to do something if you teach them that it is a SIN.

Quote
Christianity has actually changed the definition of hell in the past few years. No longer is it boiling brimstone and rain of fire, but merely the "absence of God". Wow... it seems they want to look better on the popularity charts, but the thing is, their bible says that hell is boiling brimstone and all that, so why change it? Because the bible is actually a book of horror stories with supposed "morals" to them, but with the offspring of the baby boomers being such pussies, they've had to "tone it down".


LOL... At least they did something intelligent.

Those were my points ;) Nice chat :)

I'd end with something: Being respectful is the way to go. If the guy next door believes in the King of Bannana Split that's ok, if he feels better.


Title: Easter Sunday computation
Post by: Ninkazu on June 22, 2003, 08:06:39 PM
It's really not ok, because then you have more churches opening, tearing down more trees, plowing away more land, taking away more money, all for some old guy to tell weak-minded people NOT to do that. The money that goes into building churches should go to charities. There shouldn't be an intermediary.

Quote
That makes agnosticism different from atheism. Your definition is agnostic, not atheist. AFAIK, atheists deny god's existence.

Agnostic is being open to whatever and not knowing. It really means, to its most basic of meanings "without knowledge" a title given by the Christians to "unbelievers". See why I don't like that title? An atheist, by definition, does not deny god's existance, but does not believe in any religion. Atheism isn't the religion against Christianity, so which "god" do you mean? Thor? Zeus? Pollus Athene? Shiva? Amaterasu?

Quote
Atheists say something really hard, like "God doesn't exist", but they can't "back" it.

Sure, we still don't have the science to disprove it, but yet again, many years ago, people thought matter was constant, not made up of particles called "atoms". Aristotle IMO was just a cloud gazer that people listened to. The same thing I think when I look at the case of Jesus.

Democritus lived during Aristotle's time and gave the theory of atoms to the council (or whatever) and they didn't believe him, because he couldn't prove it at the time. See where I'm getting at? I think history is about to repeat itself, only now we aren't killed for not believing in "the gods" like Socrates was.


Title: Easter Sunday computation
Post by: na_th_an on June 22, 2003, 08:14:22 PM
Okay.

Just to make it clear:

1. When I say "God" I mean any of those. ;)

2. I am also for charity vs. churches.

3. Jesus was not a cloud gazer. As I told you, all that he said was "love each other". What is wrong with that?

4. Special Relativity does not interfere with believing in god. 60% of Scientists do believe in god.


Title: Easter Sunday computation
Post by: Ninkazu on June 22, 2003, 08:17:19 PM
Before we continue, I'd like you to read this:
http://www.atheists.org/drive.thru/atheism.html

Also, Jesus was a cloud gazer. He had those ideas, yes, but... how does that not make him a cloud gazer?


Title: Easter Sunday computation
Post by: na_th_an on June 22, 2003, 08:21:31 PM
Hmm it depends on how you define "cloud gazer". I think that everyone who has the guts to fight the system is respectable, if the system is made up of crap.


Title: Easter Sunday computation
Post by: Ninkazu on June 22, 2003, 08:38:01 PM
I plan on fighting the system when I become an adult and get my student loans paid ;P

The thing is, I wouldn't respect a guy who called himself god if I were a Jew of the time back then. Now stupid Christians blame the Jews for the murder of their savior... this sounds all too much like black people wanting "reparations".


Title: Easter Sunday computation
Post by: toonski84 on June 22, 2003, 08:41:29 PM
To be frank, would you all please stop arguing?  Do you really expect the other to suddenly pick up on your core beliefs?  And if you do get them to change, what's it matter?  Would the world be a better place?  Please, just stop arguing.  Ninkazu, you don't care.  Nathan, you dont care.  I dont care.  None of 'yall care.  Problem settled.  *goes back to watching the teevee*


Title: Easter Sunday computation
Post by: na_th_an on June 22, 2003, 09:01:33 PM
C'mon, Toonski, why don't you like arguing? ;)

I was not gonna counter-attack this time. He has his beliefs, I have mine. My last post was only to reply some unclear points (my fault).

Also, I was not arguing to convince someone. I was just giving my point of view ;)


Title: Easter Sunday computation
Post by: Ninkazu on June 22, 2003, 09:18:32 PM
Hey, I think this "argument" is much cleaner than what appears on neozones ;)


Title: Easter Sunday computation
Post by: Moneo on October 19, 2006, 11:33:08 PM
Aga and WhiteTiger,

In this thread back in June 2003, each of you posted code for the calculation of Easter Sunday. At the time, I only did some spot checks on the output of your solutions.

Today, October 19, 2006, I wrote a program to be able to test Easter Sunday algorithms against one of two proven algorithms (one of mine and the other by Antoni Gual).

I searched for your algorithms submitted in June 2003, and incorporated them into the test program. These are the results:

Aga's algorithm: For the years from 1600 to 9999, there were 61 invalid dates for Easter generated. Curiously, all the bad dates were in the month of May.

WhiteTiger algorithm: produced the Easter dates 100% perfectly for years 1600 to 9999.

"better late than never."

Regards..... Moneo


Title: Easter Sunday computation
Post by: Skyler on October 20, 2006, 05:41:30 PM
Ninkazu: Yes, you're right. Stupid Christians blame the Jews for killing Christ. But if they hadn't, there would be no Christianity, and the only way to heaven would be becoming a Jew.
Second: You say the "virgin Mary" was mistranslated and should have been "young woman Mary". Any sources for that?


Title: Easter Sunday computation
Post by: Anonymous on October 21, 2006, 06:06:01 AM
he got it from the movie snatch

let this thread die or i will eat your liver with fava beans.


Title: Easter Sunday computation
Post by: Skyler on October 23, 2006, 02:57:04 PM
Fava beans? what are fava beans?
Maybe you mean java beans?


Title: Easter Sunday computation
Post by: Moneo on October 23, 2006, 03:56:51 PM
Quote from: "Skyler"
Fava beans? what are fava beans?
Maybe you mean java beans?


By mentioning to eat with "fava beans", it shows that Cha0s is a connoisseur.

Fava beans are a type of kidney beans which are commonly eaten in Europe, and mostly the white ones.  They are generally combined with pieces of meat, sausage, etc. to form an all-in-one dish. I have enjoyed several variations of these dishes in northern Spain, including the famous "Fabada Asturiana".  I also have enjoyed similar styles from Greece and Brazil.

"Java beans" --- that's funny, Skyler.

*****


Title: Easter Sunday computation
Post by: Skyler on October 24, 2006, 01:35:01 PM
Ah... I see...

"mostly the white ones"
Kidney beans or Europes?


Title: Easter Sunday computation
Post by: Agamemnus on October 26, 2006, 12:35:38 AM
Quote
Aga's algorithm: For the years from 1600 to 9999, there were 61 invalid dates for Easter generated. Curiously, all the bad dates were in the month of May.


Probably some sort of rounding error somewhere?


Title: Easter Sunday computation
Post by: Moneo on October 26, 2006, 08:04:20 PM
Quote from: "Agamemnus"
Quote
Aga's algorithm: For the years from 1600 to 9999, there were 61 invalid dates for Easter generated. Curiously, all the bad dates were in the month of May.


Probably some sort of rounding error somewhere?


No, Aga, there's no rounding in your original 2003 submitted algorithm.

I found the problem because WhiteTiger submitted a modified version of the same Butcher algorithm.
In your code:
Code:

m = (h + k + 7 * l + 114)

should be:

m = (h + k - 7 * l + 114)

That is, the + 7 should be - 7.
Then it works 100%.
A simple typo error.

Regards..... Moneo


Title: Easter Sunday computation
Post by: Agamemnus on October 27, 2006, 02:26:31 AM
I see... no stone left unturned, eh, Moneo?  :flat:


Title: Easter Sunday computation
Post by: Moneo on October 27, 2006, 10:29:15 PM
Quote from: "Agamemnus"
I see... no stone left unturned, eh, Moneo?  :flat:

That's true, Aga. Didn't want to leave you thinking that your algorithm didn't work right.

Now, I think, after fixing it, and maybe testing it quickly, you can tuck your algorithm away for whenever you might need it again.

*****


Title: Easter Sunday computation
Post by: Agamemnus on October 29, 2006, 01:16:53 AM
You know, it'd be nice if we could put that in the forum "FAQ"/wiki. I don't remember the pass anymore though. Do you?...


Title: Easter Sunday computation
Post by: Moneo on October 30, 2006, 01:09:06 AM
Quote from: "Agamemnus"
You know, it'd be nice if we could put that in the forum "FAQ"/wiki. I don't remember the pass anymore though. Do you?...

Good idea, but I don't have the pass either.
Maybe someone will post some help on how to get it.

*****


Title: Easter Sunday computation
Post by: Agamemnus on October 30, 2006, 05:04:55 PM
I remembered it! I'll ask Sumo_Jo if I can email you the pass, too.


Title: Easter Sunday computation
Post by: Moneo on October 30, 2006, 11:28:21 PM
Thanks, Aga, got your PM on the subject.

*****


Title: Easter Sunday computation
Post by: Anonymous on October 31, 2006, 03:22:05 AM
actually, hannibal lector is the connoisseur, i'm just a monkey.


Title: Easter Sunday computation
Post by: Skyler on October 31, 2006, 02:37:23 PM
Who's hannibal lector?


Title: Easter Sunday computation
Post by: Anonymous on October 31, 2006, 02:44:51 PM
he thinks you're crunchy and go good with a fine white sauce


Title: Easter Sunday computation
Post by: Moneo on October 31, 2006, 10:27:11 PM
Quote from: "Skyler"
Who's hannibal lector?

He was the main sinister character brilliantly portrayed by Anthony Hopkins in the 1991 film "The Silence of the Lambs."

*****