-
Notifications
You must be signed in to change notification settings - Fork 40
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
Display proper Hebrew year without ה #32
Comments
@20Fourteen Are you seriously using new as a variable name? isn't it a reserved keyword? |
Not in production, this is an alpha of a dev test |
Okay, I got it. I was using the wrong library. It works now `<script type="text/javascript" charset="utf-8" src="https://rawgit.com/hebcal/hebcal-js/master/client/hebcal.min.js"></script> <script> var day = new Hebcal.HDate().toString('h'); document.write(day); </script>`Result is: י"ג תמוז התשע"ו Any way to remove the ה from the תשע"ו ? |
Anyone? Is this project abandoned? |
You seem to have solved your issue, right? On Jul 22, 2016 4:08 PM, "Glenn Parker" notifications@github.com wrote:
|
No, I was using the wrong library, but once sorted I'm facing this: <script type="text/javascript" charset="utf-8" src="https://rawgit.com/hebcal/hebcal-js/master/client/hebcal.min.js"></script> <script> var day = new Hebcal.HDate().toString('h'); document.write(day); </script>Result is: י"ג תמוז התשע"ו Any way to remove the ה from the תשע"ו ? Okay, I got it. I was using the wrong library. It works now <script type="text/javascript" charset="utf-8" src="https://rawgit.com/hebcal/hebcal-js/master/client/hebcal.min.js"></script> <script> var day = new Hebcal.HDate().toString('h'); document.write(day); </script>Result is: י"ג תמוז התשע"ו Any way to remove the ה from the תשע"ו ? |
How is this achieved here? By the way there is a problem with the HTTPS on this page |
I'm not in charge of the website. It's possible those JS files are actually generated by server-side code using C. As of right now there's no simple way to get the date without the ה. You could use a regex to remove it:
This should be safe as no month name starts with ה. |
I know about a regex, I wanted to do it cleanly and hoped there's an argument for it. Perhaps getting the Gregorian date and converting day, month and year separately will yield the desired result, I wish the code would have something like Thanks |
For anyone seeking the same, here is the code: |
That's a bit risky -- it'll mess up on the 5th or 25th of the month, and any year that ends in 5. You should use my regex which also includes a space before the letter. |
Correct, I missed that, will edit (for the copy and paste people). Fixed |
Hi,
the following basic script will load the current date but with diacritics
<script type="text/javascript" charset="utf-8" src="http://hebcal.com/etc/hdate-he.js">var hebdate Hebcal.HDate(); console.log(hebdate);</script>
This displays: י״ב בְּתַמּוּז תשע״ו
Is there a way it can be called and displayed without the diacritics?
Thanks
The text was updated successfully, but these errors were encountered: