Author Topic: The Date For Non-Orthodox Easter Calculation  (Read 2826 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
The Date For Non-Orthodox Easter Calculation
« on: February 22, 2022, 12:18:18 am »
Here is a small program that calculates the date of Easter for any given year.
I use the same code that's on my calendar maker. Since it uses the Gregorian Calendar,  it starts at 1753 A.D. This is for the Non-Orthodox Easter date.

Code: QB64: [Select]
  1. 'What Is The Date For Easter (Non-Orthodox)
  2. 'By SierraKen
  3. 'Equation Code found online.
  4.  
  5. _Title "What Is The Date For Easter"
  6. start:
  7. start2:
  8. Input "          Year (Higher Than 1753 A.D.): ", PQA
  9. If PQA < 1753 Then Print: Print "          Your year is too long ago for the Gregorian Calendar, try again.": GoTo start2:
  10. If PQA <> Int(PQA) Then Print "          Cannot use decimals, try again.": GoTo start2:
  11. GoSub PAQUES:
  12. If pqm = 3 Then month$ = "March"
  13. If pqm = 4 Then month$ = "April"
  14.  
  15. day$ = Str$(PQJ)
  16. year$ = Str$(PQA)
  17. Print "          Easter Date: " + month$ + " " + day$ + ", " + year$
  18. Input "          More (Y/N):", yn$
  19. If Left$(yn$, 1) = "y" Or Left$(yn$, 1) = "Y" Then GoTo start:
  20.  
  21. 'Find the right date for Easter.
  22. PAQUES:
  23. pqm = Int(PQA / 100): PQ1 = PQA - pqm * 100: PQJ = Int(((PQA / 19 - Int(PQA / 19)) + .001) * 19)
  24. PQ2 = Int(pqm / 4): PQ3 = Int(((pqm / 4) - PQ2 + .001) * 4): PQ4 = Int((8 + pqm) / 25)
  25. PQ5 = Int((1 + pqm - PQ4 + .001) / 3): PQ4 = (15 + 19 * PQJ + pqm - PQ2 - PQ5 + .001) / 30: PQ4 = PQ4 - Int(PQ4)
  26. PQ4 = Int(PQ4 * 30): PQ5 = Int(PQ1 / 4): PQ6 = ((PQ1 / 4) - PQ5) * 4
  27. PQ7 = (32 + 2 * PQ3 + 2 * PQ5 - PQ4 - PQ6 + .001) / 7: PQ7 = (PQ7 - Int(PQ7)) * 7: PQ6 = (PQJ + 11 * PQ4 + 22 * PQ7) / 451
  28. PQ6 = Int(PQ6): PQ2 = (114 + PQ4 + PQ7 - 7 * PQ6) / 31: pqm = Int(PQ2): PQJ = Int((PQ2 - pqm + .001) * 31 + 1)
  29.