-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOMER.OPL
More file actions
79 lines (78 loc) · 1.54 KB
/
OMER.OPL
File metadata and controls
79 lines (78 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
PROC omer:
LOCAL start&,min&,max&,day%,month%,year%,total&,today&,yamim,yom%,shavua%,choice%
start::
start&=35900
max&=90000
dINIT "Sfirat Ha'omer"
dDATE start&,"When was the first day of sfira?",min&,max&
DIALOG
day%=day
month%=month
year%=year
today&=DAYS(day%,month%,year%)
total&=today&-start&
if total&>49 or total&<0
gAT 130,60 :gFONT 2 :gSTYLE 41
gPRINT "You are not in the sfira days"
pause 20
stop
else
Goto Print::
endif
Print::
day%=day
month%=month
year%=year
today&=DAYS(day%,month%,year%)
total&=today&-start&
IF HOUR>=23 AND MINUTE>=10
total&=total&+1
ENDIF
IF HOUR=23 AND MINUTE=10
BEEP 1200,300
ENDIF
yamim=total&
shavua%=INT(yamim/7)
yom%=7-(((INT(yamim/7)+1)*7)-yamim)
IF INT(yamim/7)<>yamim/7 AND yamim>7
cls
gAT 70,60 :gFONT 2 :gSTYLE 41
gPRINT "Hayom",yamim,"yom, she'hem",shavua%,"shavuot v",yom%,"yamim la'omer"
PAUSE 1200
IF yamim<50
GOTO Print::
ELSE
STOP
ENDIF
ELSEIF INT(yamim/7)=yamim/7
cls
gAT 110,60 :gFONT 2 :gSTYLE 41
gPRINT "Hayom",yamim,"yom, she'hem",shavua%,"shavuot la'omer"
PAUSE 1200
IF yamim<50
GOTO Print::
ELSE
STOP
ENDIF
ELSEIF yamim<7 AND yamim<>1
cls
gAT 130,60 :gFONT 2 :gSTYLE 41
gPRINT "Hayom",yamim,"yamim la'omer"
PAUSE 1200
IF yamim<50
GOTO Print::
ELSE
STOP
ENDIF
ELSEIF yamim=1
cls
gAT 130,60 :gFONT 2 :gSTYLE 41
gPRINT "Hayom yom echad la'omer"
PAUSe 1200
IF yamim<50
GOTO Print::
ELSE
STOP
ENDIF
ENDIF
ENDP