hebcal / hebcal-js

⛔️ DEPRECATED - a perpetual Jewish Calendar (JavaScript)
GNU General Public License v3.0
123 stars 40 forks source link

change string functions #68

Open sagi053 opened 4 years ago

sagi053 commented 4 years ago

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); }

barakplasma commented 4 years ago

I like this idea. Want to add a simple test file to the test folder? See my PR for an example of what I mean: #71

Scimonster commented 4 years ago

I like this idea. I left a couple comments with issues. (And sorry for taking so long to respond.)