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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities
Viewing File: /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
% Copyright 2006 by Till Tantau % % This file may be distributed and/or modified % % 1. under the LaTeX Project Public License and/or % 2. under the GNU Public License. % % See the file doc/generic/pgf/licenses/LICENSE for more details. \ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfcalendar.code.tex,v 1.11 2007/07/23 21:23:14 tantau Exp $ % Translation stuff \ifx\translate\@undefined \def\translate#1{#1} \fi % Load month dictionary, if possible \ifx\usedictionary\@undefined \else \usedictionary{translator-months-dictionary} \fi % Typeset a calendar % % #1 = prefix for the calendar nodes % #2 = begin date in ISO format % #3 = end date in ISO format % #4 = date rendering code % % Description: % % First note that this macro need not be called inside a pgfpicture % (even though it often will be). You can use it to typeset % calendars also using packages other than pgf. You do not even need % to load pgf to use this file. % % A calendar is typeset as follows: You specify a range of dates (by % providing a begin and an end date). Then, for each date the code #4 % is executed. When the code is called, lots of information about the % current date (like its day of week) is available. The job of % #4 is to render the date. Typically, this is done by placing nodes % somewhere, but the function could do other things as well. % It is also the job of #4 to position the calendar correctly. % % The different calls of #4 are not surrounded by TeX groups (though % you can do so yourself, of course). This means that settings can % accumulate between different calls, which is often desirable and % useful. % % Inside #4 code, different macros can be access: % % \pgfcalendarprefix % The parameter #1. This prefix is recomended for nodes inside the % calendar, but you have to use it yourself explicitly. % % \pgfcalendarbeginiso % Start date of range being typeset in ISO format (like 2006-01-10) % % \pgfcalendarbeginjulian % Julian day number of start date begin typeset % % \pgfcalendarendiso % End date of range begin typeset % % \pgfcalendarendjulian % Same as Julian day number % % \pgfcalendarcurrentjulian (a TeX-count) % Julian day number of day to be rendered/considered % % \pgfcalendarcurrentweekday % Weekday (0 = Monday) of day to be checked % % \pgfcalendarcurrentyear % Year of day to be checked % % \pgfcalendarcurrentmonth % Month of day to be chjeck % % \pgfcalendarcurrentday % Day of monath of day to be checked % % % Inside the \pgfcalendar macro the macro \ifdate is available, which % has the same effect as \pgfcalendarifdate{\pgfcalendarcurrentjulian} % (only faster). This means that you % can write, say, \ifdate{Monday}{current date is a Monday}{Not a Monday}. % % Example: % % \begin{tikzpicture} % \pgfcalendar{cal}{2007-01-20}{2007-02-10} % {\node[anchor=base] {\pgfcalendaronday}; \pgftransformyshift{-1.5em}} % \end{tikzpicture} % % \pgfcalendar{cal}{2007-01-20}{2007-02-10}{ \pgfcalendaronday\ } \long\def\pgfcalendar#1#2#3#4{% \begingroup% % Setup local \ifdate \let\ifdate=\pgfcalendar@local@ifdate% % Let's start with computing start and end dates... \def\pgfcalendarprefix{#1}% \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}% \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}% \edef\pgfcalendarbeginiso{#2}% \pgfcalendardatetojulian{#3}{\pgfutil@tempcnta}% \edef\pgfcalendarendjulian{\the\pgfutil@tempcnta}% \advance\pgfutil@tempcnta by1\relax% \edef\pgfcalendarendjulianplus{\the\pgfutil@tempcnta}% \edef\pgfcalendarendiso{#3}% % % Start main loop % \loop% \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax% % Setup information about current date \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}% {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}% \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil@tempcntb}% \edef\pgfcalendarcurrentweekday{\the\pgfutil@tempcntb}% % Render: #4% % Advance day: \advance\pgfcalendarcurrentjulian by1\relax% \repeat% \endgroup% } \newcount\pgfcalendarcurrentjulian \def\pgfcalendar@local@ifdate{% \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian% \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear% \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth% \let\pgfcalendarifdateday=\pgfcalendarcurrentday% \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday% \pgfcalendar@launch@ifdate% } % Execute on specific kinds of dates % % #1 = ISO-format date % #2 = date specification % #3 = code % % Description: % % The given code #3 is execute on every day that matches the date % specification #2. This specification is a comma-separated list of % key-value pairs with the path /pgf/calendar. The code for a % key-value should check whether the given day matches its % specification. If so, it should set \pgfcalendarmatches to true. % % When the key-value code is executed, the following macros will have % been setup: % % \pgfcalendarifdatejulian % Julian day number of day to be checked % % \pgfcalendarifdateweekday % Weekday (0 = Monday) of day to be checked % % \pgfcalendarifdateyear % Year of day to be checked % % \pgfcalendarifdatemonth % Month of day to be chjeck % % \pgfcalendarifdateday % Day of month of day to be checked % % The setting of these macros will persist after the call, so a % sideeffect of callling this macro is to setup these macros. % % By setting \ifpgfcalendar@do@not@recompute to false, the computation % of the year, month etc. is suppressed. % % Examples: % % \pgfcalendarifdate{2007-01-10}{all}{} % % Simply setup the macros % % \pgfcalendarifdate{2007-01-10}{mondays}{Is a monday} % % \pgfcalendarifdate{\mydate}{date=05-01}{\mydate is a Worker's Day} \def\pgfcalendarifdate#1#2#3#4{% \pgfcalendardatetojulian{#1}{\pgfutil@tempcnta}% \pgfcalendarjuliantodate{\pgfutil@tempcnta} {\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}% \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}% % Compute info about date \pgfcalendarjuliantoweekday{\pgfutil@tempcnta}{\pgfutil@tempcntb}% \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}% % \pgfcalendar@launch@ifdate{#2}{#3}{#4}% } \long\def\pgfcalendar@launch@ifdate#1#2#3{% % When this macro is called, the pgfcalendarifdatexxxx macros must % be setup correctly % % Set match to false \pgfcalendarmatchesfalse% \pgfqkeys{/pgf/calendar}{#1}% \ifpgfcalendarmatches% #2% \else% #3% \fi% } \newif\ifpgfcalendarmatches % Keys for matching \pgfkeys{/pgf/calendar/all/.code=\pgfcalendarmatchestrue} \pgfkeys{/pgf/calendar/Monday/.code={\ifnum\pgfcalendarifdateweekday=0\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Tuesday/.code={\ifnum\pgfcalendarifdateweekday=1\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Wednesday/.code={\ifnum\pgfcalendarifdateweekday=2\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Thursday/.code={\ifnum\pgfcalendarifdateweekday=3\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Friday/.code={\ifnum\pgfcalendarifdateweekday=4\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Saturday/.code={\ifnum\pgfcalendarifdateweekday=5\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/Sunday/.code={\ifnum\pgfcalendarifdateweekday=6\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/workday/.code={\ifnum\pgfcalendarifdateweekday<5\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/weekend/.code={\ifnum\pgfcalendarifdateweekday>4\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/equals/.cd,.value required,.code={% \pgfcalendar@special@datetojulian{#1}% \ifnum\pgfcalendarifdatejulian=\pgfutil@tempcnta\relax% \pgfcalendarmatchestrue% \fi}% } \pgfkeys{/pgf/calendar/day of month/.cd,.value required,.code={\ifnum#1=\pgfcalendarifdateday\relax\pgfcalendarmatchestrue\fi}} \pgfkeys{/pgf/calendar/end of month/.cd,.default=1,.code={% % Tricky and expensive ... do only if necessary \ifpgfcalendarmatches% \else% sigh {% \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax% \advance\pgfutil@tempcnta by#1\relax% \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgf@dummy}{\pgf@dummy}{\pgf@cal@temp}% \global\let\pgf@cal@temp=\pgf@cal@temp% }% \ifnum\pgf@cal@temp=1\relax\pgfcalendarmatchestrue\fi% \fi}% } \pgfkeys{/pgf/calendar/at least/.cd,.value required,.code={% \pgfcalendar@special@datetojulian{#1}% \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax% \else% \pgfcalendarmatchestrue% \fi% }} \pgfkeys{/pgf/calendar/at most/.cd,.value required,.code={% \pgfcalendar@special@datetojulian{#1}% \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax% \else% \pgfcalendarmatchestrue% \fi% }} \pgfkeys{/pgf/calendar/between/.cd,.value required,.code args={#1and#2}{% \pgfcalendar@special@datetojulian{#1}% \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax% \else% \pgfcalendar@special@datetojulian{#2}% \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax% \else% \pgfcalendarmatchestrue% \fi% \fi% }} \def\pgfcalendar@special@datetojulian#1{% \edef\pgf@temp{#1}% \expandafter\pgfcalendar@special@split@test\pgf@temp-\relax{#1}% } \def\pgfcalendar@special@split@test#1-#2-#3\relax#4{% \def\pgf@temp{#3}% \ifx\pgf@temp\pgfutil@empty% \def\pgf@temp{\pgfcalendarifdateyear-#1-#2}% \else% \def\pgf@temp{#4}% \fi% \pgfcalendardatetojulian{\pgf@temp}{\pgfutil@tempcnta}% } % Suggested name for nodes inside a calendar % % Description: % % It is suggested that (main) nodes (if present) in a calendar should % get this name. % % Example: % % \pgfcalendar{cal}{2007-01-20}{2007-02-10}{} % { \node[anchor=base] (\pgfcalendarsuggestedname) {\pgfcalendarifdateday}; % \pgftransformyshift{-1.5em} } % % \draw (cal-2007-01-30) -- (cal-2007-02-08); \def\pgfcalendarsuggestedname{% \ifx\pgfcalendarprefix\pgfutil@empty\else\pgfcalendarprefix-% \pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-\pgfcalendarcurrentday\fi% } % % % Date conversion functions % % % Convert a date to the Julian day number (number of days since % January 1st, -4712) % % #1 = date specification % #2 = counter that should be set to the number of days % % Description: % % The conversion is taken from the Wikipedia entry on Julian days. % % The date specification works as follows: % % - It starts with a year. Use \year for the current year (the year % the file is being typeset). % - Next comes a hyphen. % - Next comes a month (number). Use \month for the current month. % - Next comes a hyphen. % - Next comes either a day of month (number, use \day for current % day) or "last". The keyword "last" refers the last day of the % month. Thus, 2006-01-last is the same as 2006-01-31 and % 2000-02-last is the same as 2002-02-29. % - Next may come a plus sign, followed by a number (positive or % negative). This will adjust the date by the given number of % days. Thus, 2006-01-31+1 is the same as 2006-02-01 and % 2006-02-01+-2 is the same as 2006-01-30. And \year-\month-day+1 is % tomorrow. You may add a space before the +. % % Example: % % \pgfcalendardatetojulian{2006-01-10}{\mycount} \def\pgfcalendardatetojulian#1#2{\edef\pgf@temp{#1}\expandafter\pgfcalendar@datetojulian\pgf@temp+/{#2}} \def\pgfcalendar@datetojulian#1-#2-#3+#4/#5{% {% % % Store year, month and days. % \count1=#1\relax% \count2=#2\relax% % If #3=="last", then calculate first day of next month \edef\pgf@temp{#3}% \ifx\pgf@temp\pgfcalendar@last@text% \advance\count2 by1\relax% \count3=1\relax% \else% \count3=#3\relax% \fi% % % Store offset % \edef\pgf@@temp{#4}% \ifx\pgf@@temp\pgfutil@empty% \count8=0\relax% \else% \pgfcalendar@unpack#4% \fi% % % % 4) a = \lfloor (14-month) /12 \rfloor % \ifnum\count2<3\relax% \count4=1\relax% \else% \count4=0\relax% \fi% % % 5) y = year + 4800 - a % \count5=\count1\relax% \advance\count5 by 4800\relax% \advance\count5 by-\count4\relax% % % 6) m = month + 12a - 3 % \count6=\count2\relax% \count0=\count4\relax% \multiply\count0 by12\relax \advance\count6 by\count0\relax% \advance\count6 by-3\relax% % % 7) jdn = day + \floor{(153 m+2)/5} + 365y + \floor{y/4} - % \floor{y/100} + \florr{y/400} - 32045 % \count7=\count3\relax% % + \floor{(153 m+2)/5} : \count0=\count6\relax% \multiply\count0 by 153\relax% \advance\count0 by 2\relax% \divide\count0 by 5\relax% \advance\count7 by \count0\relax% % + 365y : \count0=\count5% \multiply\count0by365\relax% \advance\count7 by\count0\relax% % + \floor{y/4} \count0=\count5\relax% \divide\count0 by 4\relax% \advance\count7 by\count0% % - \floor{y/100} \count0=\count5\relax% \divide\count0 by 100\relax% \advance\count7 by-\count0\relax% % + \floor{y/400} \count0=\count5\relax% \divide\count0 by 400\relax% \advance\count7 by\count0% % - 32045 \advance\count7 by-32045\relax% % % Undo "last" advance \ifx\pgf@temp\pgfcalendar@last@text% \advance\count7by-1\relax% \fi% % Add offset \advance\count7by\count8\relax% \expandafter% }% \expandafter#5\the\count7\relax% } \def\pgfcalendar@last@text{last} \def\pgfcalendar@unpack#1+{% \count8=#1\relax% } % Convert Julian day number date. % % #1 = the number of Julian days % #2 = a macro in which the year should be stored. % #3 = a macro in which the month should be stored. % #4 = a macro in which the day should be stored. % % Formula used: % % 1) J = Julian day number % 2) j = J + 32044 % 3) g = j div 146097 % 4) dg = j mod 146097 % 5) c = (dg div 36524 + 1) * 3 div 4 % 6) dc = dg - c * 36524 % 7) b = dc div 1461 % 8) db = dc mod 1461 % 9) a = (db div 365 + 1) * 3 div 4 % 10)da = db - a * 365 % 11)y = g * 400 + c * 100 + b * 4 + a % 12)m = (da * 5 + 308) div 153 - 2 % 13)d = da - (m + 4) * 153 div 5 + 122 % 14)Y = y - 4800 + (m + 2) div 12 % 15)M = (m + 2) mod 12 + 1 % 16)D = d + 1 % % Example % % \pgfcalendarjuliantodate{\mynumber}{\myyear}{\mymonth}{\myday} \def\pgfcalendarjuliantodate#1#2#3#4{% {% % 1) J = Julian day number \count1=#1\relax% % 2) j = J + 32044 \count2=\count1\relax% \advance\count2 by 32044\relax% % 3) g = j div 146097 \count3=\count2\relax% \divide\count3 by 146097\relax% % 4) dg = j mod 146097 \count4=\count3\relax% \multiply\count4 by-146097\relax% \advance\count4 by\count2\relax% % 5) c = (dg div 36524 + 1) * 3 div 4 \count5=\count4\relax% \divide\count5 by36524\relax% \advance\count5 by1\relax% \multiply\count5 by3\relax% \divide\count5 by4\relax% % 6) dc = dg - c * 36524 \count6=\count4\relax% \count0=\count5\relax% \multiply\count0 by-36524\relax% \advance\count6 by\count0\relax% % 7) b = dc div 1461 \count7=\count6\relax% \divide\count7 by1461\relax% % 8) db = dc mod 1461 \count8=\count7\relax% \multiply\count8 by-1461\relax% \advance\count8 by\count6\relax% % 9) a = (db div 365 + 1) * 3 div 4 \count9=\count8\relax% \divide\count9 by 365\relax% \advance\count9 by 1\relax% \multiply\count9 by3\relax% \divide\count9 by4\relax% % 10)da = db - a * 365 \count10=\count8\relax% \count0=\count9\relax% \multiply\count0 by-365\relax% \advance\count10 by\count0\relax% % 11)y = g * 400 + c * 100 + b * 4 + a \count11=\count3\relax% \multiply\count11 by400\relax% \count0=\count5\relax% \multiply\count0 by100\relax% \advance\count11 by\count0\relax% \count0=\count7\relax% \multiply\count0 by4\relax% \advance\count11 by\count0\relax% \advance\count11 by\count9\relax% % 12)m = (da * 5 + 308) div 153 - 2 \count12=\count10\relax% \multiply\count12 by5\relax% \advance\count12 by 308\relax% \divide\count12 by 153\relax% \advance\count12 by -2\relax% % 13)d = - (m + 4) * 153 div 5 + 122 + da \count13=\count12\relax% \advance\count13 by 4\relax% \multiply\count13 by153\relax% \divide\count13 by5\relax% \count13=-\count13\relax% \advance\count13 by 122\relax% \advance\count13 by \count10\relax% % 14)Y = (m + 2) div 12 + y - 4800 \count14=\count12\relax% \advance\count14 by 2\relax% \divide\count14 by12\relax% \advance\count14 by\count11\relax% \advance\count14 by-4800\relax% % 15)M = (m + 2) mod 12 + 1 \count15=\count12\relax% \advance\count15 by2\relax% \count0=\count15\relax% \divide\count0 by12\relax% \multiply\count0 by12\relax% \advance\count15 by-\count0\relax% \advance\count15 by1\relax% % 16)D = d + 1 \count16=\count13% \advance\count16by 1\relax% % \xdef\pgf@temp@year{\the\count14}% \xdef\pgf@temp@month{\ifnum\count15<10 0\fi\the\count15}% \xdef\pgf@temp@day{\ifnum\count16<10 0\fi\the\count16}% }% \let#2=\pgf@temp@year% \let#3=\pgf@temp@month% \let#4=\pgf@temp@day% } % Returns the day of week as a number between 0 = Monday and 6 = % Sunday % % #1 = a Julian day number % #2 = a counter into which the weekday should be put. % % Example: % % \pgfcalendardatetojulian{2006-01-10}{\mycount} % \pgfcalendarjuliantoweekday{\mycount}{\myweekday} \def\pgfcalendarjuliantoweekday#1#2{% {% \pgfutil@tempcnta=#1\relax% #2=\pgfutil@tempcnta% \divide#2by7\relax% \multiply#2by-7\relax% \advance#2by\pgfutil@tempcnta\relax% \expandafter% }% \expandafter#2\the#2\relax% } % Converts a day of week into a weekday name (long or short) % % #1 = a number representing a weekday (0=Monday) % % Example: % % \pgfcalendardatetojulian{2006-01-10}{\mycount} % \pgfcalendarjuliantoweekday{\mycount}{\myweekday} % October 1st, 2006 was a \pgfcalendarweekdayname{\myweekday} \def\pgfcalendarweekdayname#1{% \translate{\ifcase#1Monday\or Tuesday\or Wednesday\or Thursday\or Friday\or Saturday\or Sunday\fi}% } \def\pgfcalendarweekdayshortname#1{% \translate{\ifcase#1Mon\or Tue\or Wed\or Thu\or Fri\or Sat\or Sun\fi}% } % Converts a month of year number into a month name (long or short) % % #1 = a number representing a month (1=January) % % Example: % % \pgfcalendarmonthname \def\pgfcalendarmonthname#1{% \translate{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi}% } \def\pgfcalendarmonthshortname#1{% \translate{\ifcase#1\or Jan\or Feb\or Mar\or Apr\or May\or Jun\or Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi}% } % Macro for easy typesetting of days, etc. % % #1 = kind selection % #2 = length and representation selection % % Description: % % Replaces the shorthand according to the following rules: The % first letter of the shorthand describes the kind of % shorthand. Possible kinds are: % % d = day of current date (in an invocation of \pgfcalendar) % m = month of current date % y = year of current date % w = week day of current date % % The second parameter determines how the kind is represented: % % - = shortest possible numerical way (allowed only for d, m, y) % = = same, but always of the same length (padded with blanks as % needed, allowed only for d, m, y) % 0 = numerical representation for d and m padded with leading zeros. % t = textual representation (allowed only for d, m, w) % . = abbreviated textual representation (allowed only for d, m, w) % % It is adivsed that you say, for example, % \let\%=\pgfcalendarshorthand. % % With this setting, you can typeset an ISO-date by saying \%y0-\%m0-\%d0. % For another example, on 2007-02-09, which is a % Friday, you can write "\%wt, \%mt \%d-, \%y0" to get "Friday, February 9, 2007" \def\pgfcalendarshorthand#1#2{\csname pgfcalendar@shorthand@#1#2\endcsname} \expandafter\def\csname pgfcalendar@shorthand@d-\endcsname{% {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\the\pgfutil@tempcnta}} \expandafter\def\csname pgfcalendar@shorthand@d=\endcsname{% {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}} \expandafter\def\csname pgfcalendar@shorthand@d0\endcsname{% \pgfcalendarcurrentday} \expandafter\def\csname pgfcalendar@shorthand@m-\endcsname{% {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\the\pgfutil@tempcnta}} \expandafter\def\csname pgfcalendar@shorthand@m=\endcsname{% {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}} \expandafter\def\csname pgfcalendar@shorthand@m0\endcsname{% \pgfcalendarcurrentmonth} \expandafter\def\csname pgfcalendar@shorthand@y-\endcsname{% \pgfcalendarcurrentyear} \expandafter\def\csname pgfcalendar@shorthand@y=\endcsname{% \pgfcalendarcurrentyear} \expandafter\def\csname pgfcalendar@shorthand@y0\endcsname{% \pgfcalendarcurrentyear} \expandafter\def\csname pgfcalendar@shorthand@w.\endcsname{% \pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}} \expandafter\def\csname pgfcalendar@shorthand@wt\endcsname{% \pgfcalendarweekdayname{\pgfcalendarcurrentweekday}} \expandafter\def\csname pgfcalendar@shorthand@m.\endcsname{% \pgfcalendarmonthshortname{\pgfcalendarcurrentmonth}} \expandafter\def\csname pgfcalendar@shorthand@mt\endcsname{% \pgfcalendarmonthname{\pgfcalendarcurrentmonth}} \endinput