-
Notifications
You must be signed in to change notification settings - Fork 0
/
heb-date.js
47 lines (38 loc) · 1.3 KB
/
heb-date.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
/**
* Created by Talsi on 06/12/2015.
*/
;(function(){
'use strict';
var days = [];
days[days.length] = "יום ראשון";
days[days.length] = "יום שני";
days[days.length] = "יום שלישי";
days[days.length] = "יום רביעי";
days[days.length] = "יום חמישי";
days[days.length] = "יום שישי";
days[days.length] = "יום שבת";
var months = [];
months[months.length] = "ינואר";
months[months.length] = "פברואר";
months[months.length] = "מרץ";
months[months.length] = "אפריל";
months[months.length] = "מאי";
months[months.length] = "יוני";
months[months.length] = "יולי";
months[months.length] = "אוגוסט";
months[months.length] = "ספטמבר";
months[months.length] = "אוקטובר";
months[months.length] = "נובמבר";
months[months.length] = "דצמבר";
Date.prototype.toHebrew = function(){
var dateString = '';
dateString += days[this.getDay()];
dateString += ', ';
dateString += ' ' + this.getDate();
dateString += ' ב';
dateString += months[this.getMonth()];
dateString += ', ' + this.getFullYear();
return dateString;
};
/* יום חמישי, ב לדצמבר, 2015 */
})();