-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonths.html
532 lines (449 loc) · 21 KB
/
months.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="color-scheme" content="light dark">
<title>مواقيت الصلاة</title>
<meta name="description" content="مواقيت الصلاة لجميع الدول ">
<meta name="keywords" content="الصلاة, وقت الصلاة, صلاة">
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="images/logo.png" type="image/png">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="images/salah-icon-152.png">
<link rel="manifest" href="manifest.json">
<meta property="og:title" content=" Prayer times and Azan">
<meta property="og:description" content=" prayer times and azan, for all times Fajr,Duhar,Asr,Maghrib and Isha">
<meta property="og:type" content="website">
<meta property="og:url" content="https://salah.netlify.app">
<meta property="og:image" content="//salah.netlify.app/images/logo.png">
<link rel="image_src" type="image/png" href="https://salah.netlify.app/images/logo.png">
<meta property="og:image:type" content="image/png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@amirodz">
<meta name="twitter:creator" content="@amirodz">
<meta name="twitter:title" content=" Prayer times and Azan">
<meta name="twitter:description" content=" prayer times and azan, for all times Fajr,Duhar,Asr,Maghrib and Isha">
<meta name="twitter:image" content="https://salah.netlify.app/images/logo.png">
<meta name="author" content="zahsadz">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css" integrity="sha384-+qdLaIRZfNu4cVPK/PxJJEy0B0f3Ugv8i482AKY7gwXwhaCroABd086ybrVKTa0q" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@100;300;400&family=Reem+Kufi&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<style>
body{
font-size: 8px;
font-family: Tahoma ,Arial, Verdana, Geneva, Helvetica, sans-serif;
}
</style>
</head>
<body>
<nav class="navbar fixed-top justify-content-center">
<div class="btn-group" role="group" aria-label="Basic example">
<a href="index.html" data-bs-toggle="tooltip" title="مواقيت الصلاة اليوم" data-bs-placement="bottom" class="btn btn-info"><i class="icons bi bi-alarm-fill"></i></a>
<a href="months.html" data-bs-toggle="tooltip" title="مواقيت الشهر" data-bs-placement="bottom" class="btn btn-info active"><i class="icons bi bi-calendar-check-fill"></i></a>
<div class="btn-group" role="group">
<button id="btnGroupDrop1" type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="icons bi bi-book"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
<li><a class="dropdown-item" href="azkarsabah.html">أذكار الصباح</a></li>
<li><a class="dropdown-item" href="azkarmassa.html">أذكار المساء</a></li>
<li><a class="dropdown-item" href="assma.html">أسماء الله الحسني</a></li>
</ul>
</div>
<a href="kibla.html" data-bs-toggle="tooltip" title="إتجاه القبلة" data-bs-placement="bottom" class="btn btn-info"><i class="icons bi bi-compass"></i></a>
<a class="btn btn-info" data-bs-toggle="modal" data-bs-target="#exampleModal">
<i class="icons bi bi-geo-alt-fill"></i></a>
<a data-bs-toggle="modal" data-bs-target="#settingsModal" title="إعدادات" class="btn btn-info text-danger-hover"><i class="icons bi bi-gear"></i></a>
<a href="#" id="shareBtn" data-bs-toggle="tooltip" title="شارك" data-bs-placement="bottom" class="btn btn-info"><i class="icons bi bi-share-fill"></i></a>
</div>
</nav>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-8 col-sm-12 col-lg-8">
<div role="main" id="deviceready" class="header mt-2 mb-2">
<div class="d-flex justify-content-between bg-success p-2 text-dark bg-opacity-25 rounded-pill mt-2 mb-2">
<div class="p-2 h3"><a href="javascript:displayMonth(-1)">
<i class="bi bi-arrow-right-circle-fill text-warning"></i></a></div>
<div class="p-2 h3" id="table-title"></div>
<div class="p-2 h3"><a href="javascript:displayMonth(+1)">
<i class="bi bi-arrow-left-circle-fill text-warning"></i></a></div>
</div>
<div id="tab" class="table-responsive-sm">
<table id="mtb" class="table table-sm">
<thead class="table-secondary">
<tr>
<th>الأيام</th>
<th>هجري</th>
<th>الفجر</th>
<th>الشروق</th>
<th>الظهر</th>
<th>العصر</th>
<th>المغرب</th>
<th>العشاء</th>
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">إعدادات مواقيت صلاة </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="searchData" class="d-flex" role="search" >
<input class="form-control w-75 me-2" type="search" name="search" id="search" placeholder="أدخل إسم المدينة" aria-label="Search">
<button class="btn btn-outline-success" id="submit" type="button">إبحث</button>
</form>
<div class="d-flex justify-content-center">
<div class="loader spinner-border text-success" style="display: none;" role="status">
<span class="visually-hidden">Loading...</span></div>
</div>
<ul class="list-group w-75" id="result"></ul>
<form class="needs-validation" >
<div class="mb-3">
<input type="hidden" id="regionname">
<input type="hidden" id="latitude">
<input type="hidden" id="longitude">
<input type="hidden" id="timezonename">
<input type="hidden" id="fajr">
<input type="hidden" id="dhuhr">
<input type="hidden" id="asr">
<input type="hidden" id="maghrib">
<input type="hidden" id="isha">
</div>
<label for="prayerMethod" class="form-label">طريقة الحساب:</label>
<select class="form-select form-select-sm mb-3" id="prayerMethod" required>
<option selected disabled value=""> طريقة الحساب </option>
<option value="0">رابطة العالم الإسلامي(MWL)</option>
<option value="1">الهيئة العامة المصرية للمساحة</option>
<option value="2">كراتشي - جامعة العلوم الإسلامية</option>
<option value="3">مكه - ام القرى</option>
<option value="4">دبي</option>
<option value="5">Moon sighting Committee</option>
<option value="6">الجمعية الإسلامية لأمريكا الشمالية (ISNA)</option>
<option value="7">الكويت</option>
<option value="8">قطر</option>
<option value="9">هيئة المجلس الإسلامي السنغافوري (مویس)</option>
<option value="10">جامعة طهران - معهد الجيوفيزياء</option>
<option value="11">الشؤون الدينية التركية</option>
<option value="12">وزارة الشؤون الدينية والأوقاف الجزائرية</option>
</select>
<div class="invalidprayerMethod"></div>
<div class="invalid-feedback">
طريقة الحساب
</div>
<label for="asrMethod" class="form-label"> مذهب حساب العصر : </label>
<select class="form-select form-select-sm mb-3" id="asrMethod" required>
<option selected disabled value="">إختر طريقة حساب العصر</option>
<option value="0">شافعي، حنبلي، مالكي</option>
<option value="1">حنفي</option>
</select>
<div class="invalid-feedback">
إختر طريقة حساب العصر.
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">غلق</button>
<button type="button" id="btn_btn_update" class="btn btn-primary">حفظ الإعدادات</button>
</div>
</form>
</div>
</div>
</div>
<!-- settings Modal -->
<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">تعديل أوقات الصلاة </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="bd-example">
<nav>
<div class="nav nav-tabs mb-2" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">تعديل الوقت</button>
<button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">طريقة الحساب</button>
<button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">مذهب العصر</button>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">
<div class="row">
<div class="col-md-6">
<div class="card text-center text-dark bg-warning mb-2" style="width: 18rem;">
<h5 class="card-header text-dark">تعديل وقت الفجر</h5>
<div class="card-body">
<input type="number" class="form-control" id="fajr_s" min="-20" max="20">
</div>
</div>
</div>
<!-- -->
<div class="col-md-6">
<div class="card text-center text-dark bg-warning mb-2" style="width: 18rem;">
<h5 class="card-header text-dark">تعديل وقت الظهر </h5>
<div class="card-body">
<input type="number" class="form-control" id="dhuhr_s" min="-20" max="20">
</div>
</div>
</div>
<!-- -->
<div class="col-md-6">
<div class="card text-center text-dark bg-warning mb-2" style="width: 18rem;">
<h5 class="card-header text-dark">تعديل وقت العصر </h5>
<div class="card-body">
<input type="number" class="form-control" id="asr_s" min="-20" max="20">
</div>
</div>
</div>
<!-- -->
<div class="col-md-6">
<div class="card text-center text-dark bg-warning mb-2" style="width: 18rem;">
<h5 class="card-header text-dark"> تعديل وقت المغرب </h5>
<div class="card-body">
<input type="number" class="form-control" id="maghrib_s" min="-20" max="20">
</div>
</div>
</div>
<!-- -->
<div class="col-md-6">
<div class="card text-center text-dark bg-warning mb-2" style="width: 18rem;">
<h5 class="card-header text-dark"> تعديل وقت العشاء </h5>
<div class="card-body">
<input type="number" class="form-control" id="isha_s" min="-20" max="20">
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">
<!-- -->
<div class="card text-center text-white bg-success mb-5">
<h5 class="card-header text-dark"> طريقة الحساب: </h5>
<div class="card-body">
<select class="form-select form-select-sm mb-3" id="prayerMethod_s" required>
<option selected disabled value=""> طريقة الحساب </option>
<option value="0">رابطة العالم الإسلامي(MWL)</option>
<option value="1">الهيئة العامة المصرية للمساحة</option>
<option value="2">كراتشي - جامعة العلوم الإسلامية</option>
<option value="3">مكه - ام القرى</option>
<option value="4">دبي</option>
<option value="5">Moon sighting Committee</option>
<option value="6">الجمعية الإسلامية لأمريكا الشمالية (ISNA)</option>
<option value="7">الكويت</option>
<option value="8">قطر</option>
<option value="9">هيئة المجلس الإسلامي السنغافوري (مویس)</option>
<option value="10">جامعة طهران - معهد الجيوفيزياء</option>
<option value="11">الشؤون الدينية التركية</option>
<option value="12">وزارة الشؤون الدينية والأوقاف الجزائرية</option>
</select> </div>
</div>
</div>
<div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">
<!-- -->
<div class="card text-center text-dark bg-info mb-5">
<h5 class="card-header text-dark"> مذهب حساب العصر : </h5>
<div class="card-body">
<select class="form-select form-select-sm mb-3" id="asrMethod_s" required>
<option selected disabled value="">إختر طريقة حساب العصر</option>
<option value="0">شافعي، حنبلي، مالكي</option>
<option value="1">حنفي</option>
</select>
</div>
</div>
<!-- -->
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">غلق</button>
<button type="button" id="settingsModal_update" class="btn btn-success">حفظ الإعدادات</button>
</div>
</div>
</div>
</div>
<!-- settings Modal -->
<div align="center" style="margin-top: 7px">
المصدر: <a href="http://praytimes.org/" class="tooltip-s mb-3">PrayTimes.org</a> |
عرض الوقت : <a id="time-format" href="javascript:switchFormat(1)" title="إضغط لتغيير عرض الوقت" class="tooltip-s mb-3 command"></a>
<button style="display: none;" onclick="exportTableToCSV('salat.csv')"> تحمل ملف CSV </button>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/manuelmhtr/countries-and-timezones/dist/index.js" type="text/javascript"></script>
<script src="js/store.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.nice-number.min.js"></script>
<script src="js/settings.js"></script>
<script src="js/adhan.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.min.js"></script>
<script type="text/javascript">
if (localStorage.getItem('lat') !== null) {
} else {
// $('#exampleModal').modal('show');
window.location.replace("index.html");
}
var DateTime = luxon.DateTime;
var Interval = luxon.Interval;
var Duration = luxon.Duration;
var wdNames = new Array("الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت");
var lat = localStorage.getItem('lat');
var lng = localStorage.getItem('lng');
var timeZone = localStorage.getItem('timezonename');
var HJR_OFFSET = localStorage.getItem('HJR_OFFSET');
var fajr = localStorage.getItem('fajr');
var dhuhr = localStorage.getItem('dhuhr');
var asr = localStorage.getItem('asr');
var maghrib = localStorage.getItem('maghrib');
var isha = localStorage.getItem('isha');
var prayerMethod = localStorage.getItem('prayerMethod');
var asrMethod = localStorage.getItem('asrMethod');
const coordinates = new adhan.Coordinates(lat,lng);
var params;
switch(parseInt(prayerMethod)){
case 0:
params = adhan.CalculationMethod.MuslimWorldLeague()
break
case 1:
params = adhan.CalculationMethod.Egyptian()
break
case 2:
params = adhan.CalculationMethod.Karachi()
break
case 3:
params = adhan.CalculationMethod.UmmAlQura()
break
case 4:
params = adhan.CalculationMethod.Dubai()
break
case 5:
params = adhan.CalculationMethod.MoonsightingCommittee()
break
case 6:
params = adhan.CalculationMethod.NorthAmerica()
break
case 7:
params = adhan.CalculationMethod.Kuwait()
break
case 8:
params = adhan.CalculationMethod.Qatar()
break
case 9:
params = adhan.CalculationMethod.Singapore()
break
case 10:
params = adhan.CalculationMethod.Tehran()
break
case 11:
params = adhan.CalculationMethod.Turkey()
break
case 12:
params = adhan.CalculationMethod.Other();
params.fajrAngle = 18;
params.ishaAngle = 17;
params.ishaInterval = 0;
params.maghribAngle = 0;
params.methodAdjustments = { maghrib: 3 };
break
default:
params = adhan.CalculationMethod.MuslimWorldLeague()
}
switch(parseInt(asrMethod)){
case 0:
params.madhab = adhan.Madhab.Shafi;
break
case 1:
params.madhab = adhan.Madhab.Hanafi;
break
default:
params.madhab = adhan.Madhab.Hanafi;
}
params.polarCircleResolution = adhan.PolarCircleResolution.AqrabYaum;
//params.highLatitudeRule = adhan.HighLatitudeRule.SeventhOfTheNight;
//params.highLatitudeRule = adhan.HighLatitudeRule.recommended();
//params.rounding = adhan.Rounding.None;
//params.rounding = adhan.Rounding.Up;
params.rounding = adhan.Rounding.Nearest;
params.adjustments = {
fajr: +fajr,
//sunrise: 0,
dhuhr: +dhuhr,
asr: +asr,
maghrib: +maghrib,
isha: +isha
};
var wdNames = new Array("الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت");
var currentDate = new Date();
var timeFormat = 1;
switchFormat(0);
// display monthly timetable
function displayMonth(offset) {
currentDate.setMonth(currentDate.getMonth()+ 1* offset);
var month = currentDate.getMonth();
var year = currentDate.getFullYear();
var title = monthFullName(month)+ ' '+ year;
document.getElementById('table-title').innerHTML = title;
makeTable(year, month, lat, lng, timeZone);
}
function makeTable(year, month, lat, lng, timeZone) {
var date = new Date(year, month, 1);
var endDate = new Date(year, month+ 1, 1);
var format = timeFormat ? 'hh:mm a' : 'HH:mm';
console.log(format);
var html = '';
while (date < endDate) {
var d = date.getFullYear() + '-' + date.getMonth().toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0');
console.log(d);
var output = ['Fajr', 'Sunrise', 'Dhuhr', 'Asr', 'Maghrib', 'Isha'];
var times = new adhan.PrayerTimes(coordinates, date, params);
var islamic = DateTime.fromJSDate(date).setZone(timeZone).reconfigure({ outputCalendar: "islamic" });
var hijr = islamic.setLocale('ar').toLocaleString(DateTime.DATE_HUGE);
//console.log(times);
//console.log(date);
var today = new Date();
var isToday = (date.getMonth() == today.getMonth()) && (date.getDate() == today.getDate());
var klass = isToday ? 'table-warning' : 'table-info';
//monthFullName(date.getMonth())
html += '<tr class="'+klass+'"><td class="text-start text-wrap">'+date.getDate()+ '-'+wdNames[date.getDay()]+'</td><td>'+hijr+'</td>';
for (var i in output){
html += '<td>'+DateTime.fromJSDate(times[output[i].toLowerCase()]).setZone(timeZone).setLocale('en').toFormat(format)+ '</td>';
}
html += '</tr>';
date.setDate(date.getDate() + 1);
}
const tabelBody = document.querySelector("#tableBody");
tableBody.innerHTML = html;
}
function switchFormat(offset) {
var formats = ['24-ساعة', '12-ساعة'];
timeFormat = (timeFormat+ offset)% 2;
document.getElementById('time-format').innerHTML = formats[timeFormat];
update();
}
function update() {
displayMonth(0);
}
function monthFullName(month) {
//var monthName = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var monthName = new Array('كانون ثاني/يناير/جانفي', 'شباط/فبراير/فيفري', 'آذار/مارس', 'نيسان/أبريل/أفريل', 'أيار/مايو/ماي', 'حزيران/يونيو/جوان', 'تموز/يوليو/جويلية', 'آب/أغسطس/أوت', 'أيلول/سبتمبر', 'تشرين أول/أكتوبر', 'تشرين ثاني/نوفمبر', 'كانون أول/ديسمبر');
return monthName[month];
}
</script>
<script src="js/webshare.js"></script>
</body>
</html>