-
Notifications
You must be signed in to change notification settings - Fork 0
/
RuHebDate.html
98 lines (92 loc) · 3.26 KB
/
RuHebDate.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Yahalom Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
<table width="100%">
<tr>
<td width="48%">
<div id="heDateHeb" style="font-size: 50px; color: white; font-weight: bold; text-align: left;">
<script type=" text/javascript " charset="utf-8 " src="https://www.hebcal.com/etc/hdate-he.js "></script>
</div>
</td>
<td width="4%">
<div id="heDate" style="font-size: 0px; color: white; font-weight: bold; text-align: left;">
<script type=" text/javascript " charset="utf-8 " src="https://www.hebcal.com/etc/hdate-en.js "></script>
</div>
</td>
<td width="48%">
<div id="ruDate" style="font-size: 50px;text-align: right; color: white; font-weight: bold;">
</div>
</td>
</tr>
</table>
<br>
<script>
$(document).ready(function() {
var hebDate = document.getElementById("heDate").innerText;
console.log(hebDate);
var hebArray = hebDate.split(" ");
var currDay = hebArray[0].substr(0, hebArray[0].length - 2);
console.log(currDay);
var engMonth = hebArray[2].substr(0, hebArray[2].length - 1);
var ruMonth = "";
switch (engMonth) {
case "Tishrei":
ruMonth = "Тишрей";
break;
case "Cheshvan":
ruMonth = "Хешван";
break;
case "Kislev":
ruMonth = "Кислев";
break;
case "Tevet":
ruMonth = "Тевет";
break;
case "Sh'vat":
ruMonth = "Шват";
break;
case "Adar":
ruMonth = "Адар";
break;
case "Adar I":
ruMonth = "Адар 1";
break;
case "Adar II":
ruMonth = "Адар 2";
break;
case "Nisan":
ruMonth = "Нисан";
break;
case "Iyyar":
ruMonth = "Ияр";
break;
case "Sivan":
ruMonth = "Сиван";
break;
case "Tamuz":
ruMonth = "Тамуз";
break;
case "Av":
ruMonth = "Ав";
break;
case "Elul":
ruMonth = "Элул";
break;
default:
ruMonth = engMonth;
}
console.log(ruMonth);
currYear = hebArray[3];
console.log(currYear);
$("#ruDate").html(currDay + " " + ruMonth + ", " + currYear)
});
</script>
</body>
</html>