Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change string functions #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

change string functions #68

wants to merge 2 commits into from

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

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

README.md Show resolved Hide resolved
@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.

None yet

3 participants