Const BS=!"\008", Cr=!"\n", Esc=!"\27", Teb=!"\009", FunChr=!"\255" #include "vbcompat.bi" #include "inputln.bi" Declare Function GEFD(byVal Jahr As Integer) As Double 'strict gaussian easter formula, returns serial date as double Declare Function GEFS(byVal Jahr As Integer, byVal lng As String="de") As String 'doesn't need vbcompat.bi Var y=0, lng="" Print !"d=deutsch\ne=english\nBitte Sprache angeben/Choose a language, please "; Do lng=lcase(Inkey) Sleep 1 Loop Until Instr("de", lng) Print lng Cls Print *IIF(lng="d", @"Ostersonntag mit der Gausschen Osterformel berechnen", @"Compute eastersunday using gauss' easter formula") Print "c 2007 by ytwinky, MD -- " &*IIF(lng="d", @"aber ohne jede Garantie", @"but without any warranty") &" ;-))" y=Val(InputLn(*IIF(lng="d", @"Berechne Ostersonntag von ", @"Compute eastersunday in "), "D",,,,, Right(Date, 4))) Print *IIF(lng="d", @"Ostersonntag ist ", @"Eastersunday is ") &Format(GEFD(y), *IIF(lng="d", @"dd.mm.yyyy", @"mmm dd, yyyy")) Print *IIF(lng="d", @"Ostersonntag ist ", @"Eastersunday is ") &GEFS(y, lng) GetKey Function GEFD(byVal X As Integer) As Double 'strict gaussian easter formula, returns serial date as double Var a=X Mod 19, b=X Mod 4, c=X Mod 7, k=X\100, p=(8*k+13)\25, q=k\4, M=(15+k-p-q) Mod 30 Var N=(4+k-q) Mod 7, d=(19*a+M) Mod 30, e=(2*b+4*c+6*d+N) Mod 7 d+=22+e M=3-(d>31) d+=31*(d>31) Return DateSerial(X, M, d) End Function Function GEFS(byVal Jahr As Integer, byVal lng As String="d") As String 'doesn't need vbcompat.bi Var Monat=Jahr\100, Tag=(19*(Jahr Mod 19)+(15+Monat-(8*Monat+13)\25-Monat\4) Mod 30) Mod 30 Tag+=22+((Jahr Mod 4)*2+(Jahr Mod 7)*4+6*Tag+(4+Monat-Monat\4) Mod 7) Mod 7 Monat=3-(Tag>31) Tag+=31*(Tag>31) Select Case lcase(lng) Case "e" Return Hex(Monat, 2) &"." &*IIF(Tag<10, @"0", @"") &Str(Tag) &", " &Jahr Case Else Return *IIF(Tag<10, @"0", @"") &Str(Tag) &"."+Hex(Monat, 2) &"." &Jahr End Select End Function