Skip to content

change string functions#68

Open
sagi053 wants to merge 2 commits intohebcal:masterfrom
sagi053:master
Open

change string functions#68
sagi053 wants to merge 2 commits intohebcal:masterfrom
sagi053:master

Conversation

@sagi053
Copy link

@sagi053 sagi053 commented Jul 19, 2019

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

sagi053 added 2 commits July 19, 2019 13:41
1) adding week day names dictionary(hebrew and english).
2) adding 4 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.
	4)
3) adding method to get the name of week day.
4) adding method 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
Copy link

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants