Forum > Other

Easter

<< < (3/3)

MarkMLl:
Incidentally, committed nerds might find this book https://en.wikipedia.org/wiki/Calendrical_Calculations interesting.

Unfortunately all of the maths in it is Lisp... I've never explored how easily a compatible implementation coild be embedded in an FPC program (or for that matter in anything else).

MarkMLl

winni:
Hi!

The algorithm:

Take the spring equinox.

Take the next fullmoon.

Take the next sunday.

That ist easter sunday.

And here some old Delphi stuff derived from the formula from
CF Gauß:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---FUNCTION Easter(aYear: WORD): TDateTime;VAR  A, B, C, D, E, F, G, H, I, J, K, L, M, N: INTEGER;  vDay, vMonth: WORD;BEGIN  A := aYear MOD 19;  B := aYear DIV 100;  C := aYear MOD 100;   D := B DIV 4;  E := B MOD 4;   F := (B + 8) DIV 25;  G := (B - F + 1) DIV 3;  H := (19 * A + B - D - G + 15) MOD 30;  I := C DIV 4;  J := C MOD 4;  K := (32 + 2 * E + 2 * I - H - J) MOD 7;  L := (A + 11 * H + 22 * K) DIV 451;  M := (H + K - 7 * L + 114) DIV 31;  N := (H + K - 7 * L + 114) MOD 31;   vDay := N + 1;  IF M = 3 THEN vMonth := 3 ELSE vMonth := 4;  Result := EncodeDate(aYear, vMonth, vDay);END;                               


Winni

MarkMLl:

--- Quote from: winni on April 04, 2021, 03:38:30 pm ---The algorithm:

--- End quote ---

If you looked at the book- or even the Wp page I cited- you'd discover that it ranges far more widely than the simple Computus (which in isolation. once understood, isn't particularly interesting).

MarkMLl

JuhaManninen:
Oh boy, this is so international.
I confess I had to check the exact location of Guyana from a map.
I don't remember many news from Guyana or its neighbor Suriname. It is good of course because international news are typically about bad things.
I guess the climate is nice there.

Filomena storm, yes. I saw pics and videos of it! Both north-America and Europe had record cold weathers.
Actually sun's activity and changes in the Golf-stream have predicted a colder period. I personally like warmth more than cold, but unfortunately it is not getting warmer.

Anyway, fortunately felling trees is not considered a crazy act here, at least if you do it for your own trees.
Otherwise myself, my neighbors, and actually most people in countryside would be carried to loony bin.
My small forest grows more wood than I can burn in a fireplace. Wood is abundant here.

A professional lumberjack worked a full day for my neighbor.
He had a Stihl MS 500i motor saw, the world's first saw with a fuel injection motor. Wow!
 https://www.stihl.com/STIHL-power-tools-A-great-range/Chainsaws/Petrol-chainsaws-for-forestry/287735-131/MS-500i.aspx
I got inspired to cut more trees, too.
I underestimated the wind and was careless with one. There was a hazardous situation but finally nothing bad happened.
The tree fell to the "wrong" side where wind pushed it :
 https://drive.google.com/file/d/1wlkp_EfOKYCM23rHO0pa2K0i2VMz872V/view?usp=sharing
You see it had split before falling, presumably kicking strongly upwards. A kind of "barber chair" situation.
It was not a big tree but still weights ~600..700kg.
I decided to improve my equipment. A jack for pushing a tree is handy. I want a bigger saw with a longer blade for felling. There are used professional saws for a good price available. :)

This is very much out of topic in FPC / Lazarus forum, but I am happy to tell more in private mails etc. in case somebody is interested.

Navigation

[0] Message Index

[*] Previous page

Go to full version