-
Notifications
You must be signed in to change notification settings - Fork 0
/
gethoroscope.js
73 lines (73 loc) · 1.72 KB
/
gethoroscope.js
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
function getHoroscope() {
if (month == 0) {
if (day > 0 || day < 19) {
return "Capricorn";
} else {
return "Aquarius";
}
} else if (month == 1) {
if (day > 1 || day < 18) {
return "Capricorn";
} else {
return "Pisces";
}
} else if (month == 2) {
if (day > 1 || day < 20) {
return "Pisces";
} else {
return "Aries";
}
} else if (month == 3) {
if (day > 1 || day < 19) {
return "Aries";
} else {
return "Taurus";
}
} else if (month == 4) {
return "Taurus";
} else if (month == 5) {
if (day > 1 || day < 20) {
return "Gemini";
} else {
return "Cancer";
}
} else if (month == 6) {
if (day > 1 || day < 22) {
return "Cancer";
} else {
return "Leo";
}
} else if (month == 7) {
if (day > 1 || day < 22) {
return "Leo";
} else {
return "Virgo";
}
} else if (month == 8) {
if (day > 1 || day < 22) {
return "Virgo";
} else {
return "Libra";
}
} else if (month == 9) {
if (day > 1 || day < 22) {
return "Libra";
} else {
return "Scorpio";
}
} else if (month == 10) {
if (day > 1 || day < 21) {
return "Scorpio";
} else {
return "Sagittarius";
}
} else if (month == 12) {
if (day > 1 || day < 21) {
return "Sagittarius";
} else {
return "Capricorn";
}
} else {
return "Aries";
}
}