summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty22
1 files changed, 18 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty b/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
index 5e433a3e308..c75b2f5faa9 100644
--- a/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
+++ b/Master/texmf-dist/tex/xelatex/polyglossia/hebrewcal.sty
@@ -1,8 +1,16 @@
\ProvidesPackage{hebrewcal}
- [2008/07/01 v2.4 %
+ [2012/04/29 v2.5 %
Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)]
+\RequirePackage{xkeyval}
\RequirePackage{bidi}
+\newif\if@xpg@hebrewcal@marcheshvan
+\DeclareOption{marcheshvan}{\@xpg@hebrewcal@marcheshvantrue}
+\ifx\if@xpg@hebrew@marcheshvan\undefined
+ \newif\if@xpg@hebrew@marcheshvan
+ \@xpg@hebrew@marcheshvanfalse
+\fi
+
%% TODO rewrite this on the basis of Reingold & Dershowitz
%% on the model of hijrical (using calc)
@@ -21,6 +29,9 @@
\@FormatForEnglish{\hebrewday}{\hebrewmonth}{\hebrewyear}%
\fi}
\def\hebrewtoday{\hebrewdate{\day}{\month}{\year}}
+% The command name is capitalised in the doc, and this is consistent
+% with other names such as \Hijritoday and \Jalalitoday.
+\let\Hebrewtoday=\hebrewtoday
\def\hebrewsetreg{%
\HebrewFromGregorian{\day}{\month}{\year}%
{\hebrewday}{\hebrewmonth}{\hebrewyear}}
@@ -55,7 +66,7 @@
\ifcase#1%
% nothing for 0
\or תשרי%
- \or השון%
+ \or\if@xpg@hebrewcal@marcheshvan מרחשון\else\if@xpg@hebrew@marcheshvan מרחשון\else חשון\fi\fi%
\or כסלו%
\or טבת%
\or שבט%
@@ -80,7 +91,8 @@
\ifcase #1%
% nothing for 0
\or Tishrei%
- \or Heshvan%
+ % \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else\if@xpg@hebrew@marcheshvan Marcheshvan\else Heshvan\fi\fi%
+ \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else\if@xpg@hebrew@marcheshvan Marcheshvan\else Heshvan\fi\fi%
\or Kislev%
\or Tebeth%
\or Shebat%
@@ -265,7 +277,8 @@
304 \or%
334%
\fi%
- \if@GregorianLeap{#2}%
+ \@CheckIfGregorianLeap{#2}%
+ \if@GregorianLeap%
\ifnum #1 > 2% % if month after February
\advance #3 by 1% % add leap day
\fi%
@@ -328,4 +341,5 @@
\repeat%
\global\advance #5 by -1%
\global\advance #4 by -\tmpy}}
+\ProcessOptions*
\endinput