1) adding week day names dictionary(hebrew and english).
2) adding 3 string functions , spread them from toString function.
1) getDayName - getting the hebrew day
2) getMonthName - getting the hebrew month
3) getYearName - getting the hebrew year.
3) adding function to get the name of week day.
4) adding function dateFormat - with date formatter u can get the date with any format you need.
usage :
let hebCalObj = new Hebcal();
let hebrewDateObj = (hebCalObj).find(new Date)[0];
if (hebrewDateObj){
weekDay = 'יום ' + hebrewDateObj.getWeekDayName(lang);
hebrewDate = hebrewDateObj.dateFormat('D M',lang);
}
1) adding week day names dictionary(hebrew and english). 2) adding 3 string functions , spread them from toString function. 1) getDayName - getting the hebrew day 2) getMonthName - getting the hebrew month 3) getYearName - getting the hebrew year. 3) adding function to get the name of week day. 4) adding function dateFormat - with date formatter u can get the date with any format you need. usage : let hebCalObj = new Hebcal(); let hebrewDateObj = (hebCalObj).find(new Date)[0]; if (hebrewDateObj){ weekDay = 'יום ' + hebrewDateObj.getWeekDayName(lang); hebrewDate = hebrewDateObj.dateFormat('D M',lang); }