Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. =========EASTER.BAT========
  2. @echo off
  3. set qbascmd=%1
  4. c:savedosqbasic /run L:savecdatabatcheaster.bas
  5. set qbascmd=
  6. ==========EASTER.BAS========
  7. s$ = ENVIRON$("QBASCMD")
  8. DEF fnddv (y, x) = INT(y / x)
  9. yr = VAL(s$)
  10. bb = fnddv(yr, 100): cc = yr MOD 100: aa = yr MOD 19
  11. dd = fnddv(bb, 4): ee = bb MOD 4
  12. gg = fnddv(8 * bb + 13, 25)
  13. hh = (19 * aa + bb - dd - gg + 15) MOD 30
  14. gm = fnddv(aa + 11 * hh, 319)
  15. ii = fnddv(cc, 4): kk = cc MOD 4
  16. gl = (2*ee+2*ii-kk-hh+gm+32) mod 7
  17. t1 = hh - gm + 18
  18. nn = fnddv(t1+71, 25)
  19. pp = (t1 + nn) mod 32
  20. print using "Easter Moon of #### is ##/##; yr, pp, nn
  21. t1 = hh - gm + gl + 19
  22. nn = fnddv(t1+71, 25)
  23. pp = (t1 + nn) mod 32
  24. print using "Easter Sunday of #### is ##/##"; yr, pp, nn,
  25. SYSTEM
  26. =======================================
  27.  
  28. if A > 513 then md = A div 30 + 10 ; else md = A div 19
  29.  
  30. solar year = 'mean tropical year'
  31. lunar year = 'mean tropical month' * 235/19
  32.  
  33. // is MOD 120 // 7 = 1
  34. % is DIV 120 % 7 = 17
  35.  
  36. austral = (360*year + 304 + cor(year)) // 570
  37. when austral < 513 /* lunae = date of full moon */
  38. then lunae = austral % 19 + 21
  39. else lunae = austral % 30 + 31
  40. easter = day(lunae + 8) % 7 * 7 /* 7 | day(sunday) */
  41.  
  42. cor(year) is defined for calendar to calendar, as
  43.  
  44. julian:
  45. cor(year) = 0
  46. gregorian: /* 43 epact shifts in 10,000 years */
  47. cor(year) = 19 * (year % 100 - year % 400 - (year % 100 * 8 + 13) % 25)
  48. binary: /* 7 epact shifts in 1536 years */
  49. cor(year) = 19 * ((year + 128) % 256 + year % 1536)
  50. c33a: /* 1 epact shift every 231 years */
  51. cor(year) = 19 * ((year + 165) % 231)
  52. elif: /* 1 golden jump every 363 years */
  53. cor(year) = 30 * ( year % 363)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement