Debian Codegraph @

texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.dtx

raw
1 %\iffalse
2 %<*package>
3 %% \CharacterTable
4 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
5 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
6 %% Digits \0\1\2\3\4\5\6\7\8\9
7 %% Exclamation \! Double quote \" Hash (number) \#
8 %% Dollar \$ Percent \% Ampersand \&
9 %% Acute accent \' Left paren \( Right paren \)
10 %% Asterisk \* Plus \+ Comma \,
11 %% Minus \- Point \. Solidus \/
12 %% Colon \: Semicolon \; Less than \<
13 %% Equals \= Greater than \> Question mark \?
14 %% Commercial at \@ Left bracket \[ Backslash \\
15 %% Right bracket \] Circumflex \^ Underscore \_
16 %% Grave accent \` Left brace \{ Vertical bar \|
17 %% Right brace \} Tilde \~}
18 %</package>
19 %\fi
20 % \iffalse
21 % Doc-Source file to use with LaTeX2e
22 % Copyright (C) 2015-2020 Nicola Talbot, all rights reserved.
23 % Copyright (C) 2017-2020 Paul A. Patience <[email protected]>, all rights reserved.
24 % \fi
25 % \iffalse
26 %<*driver>
27 \documentclass{ltxdoc}
28
29 \usepackage{alltt}
30 \usepackage{graphicx}
31 \usepackage{fontspec}
32 \usepackage[colorlinks,
33 bookmarks,
34 hyperindex=false,
35 pdfauthor={Nicola L.C. Talbot and Paul A. Patience},
36 pdftitle={datetime2.sty Romanian Module}]{hyperref}
37
38 \setmainfont{Liberation Serif}
39 \setmonofont{Liberation Mono}
40
41 \CheckSum{478}
42
43 \renewcommand*{\usage}[1]{\hyperpage{#1}}
44 \renewcommand*{\main}[1]{\hyperpage{#1}}
45 \IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
46 \setcounter{IndexColumns}{2}
47
48 \newcommand*{\sty}[1]{\textsf{#1}}
49 \newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
50
51 \RecordChanges
52 \PageIndex
53 \CodelineNumbered
54
55 \begin{document}
56 \DocInput{datetime2-romanian.dtx}
57 \end{document}
58 %</driver>
59 %\fi
60 %
61 %\MakeShortVerb{"}
62 %
63 %\title{Romanian Module for datetime2 Package}
64 %\author{Nicola L. C. Talbot (inactive) \\
65 % Paul A. Patience\thanks{E-mail: [email protected]}}
66 %\date{2020-09-21 (v1.02)}
67 %\maketitle
68 %
69 %\begin{abstract}
70 %This is the Romanian language module for the \sty{datetime2}
71 %package. If you want to use the settings in this module you must
72 %install it in addition to installing \sty{datetime2}. If you use
73 %\sty{babel} or \sty{polyglossia}, you will need this module to
74 %prevent them from redefining \cs{today}. The \sty{datetime2}
75 % \opt{useregional} setting must be set to "text" or "numeric"
76 % for the language styles to be set.
77 % Alternatively, you can set the style in the document using
78 % \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language}
79 % depending on the value of the \opt{useregional} setting.
80 %\end{abstract}
81 %
82 %\StopEventually{%
83 %\clearpage
84 %\phantomsection
85 %\addcontentsline{toc}{section}{Change History}%
86 %\PrintChanges
87 %\addcontentsline{toc}{section}{\indexname}%
88 %\PrintIndex}
89 %\section{The Code}
90 %\iffalse
91 % \begin{macrocode}
92 %<*datetime2-romanian-utf8.ldf>
93 % \end{macrocode}
94 %\fi
95 %\subsection{UTF-8}
96 %This file contains the settings that use UTF-8 characters. This
97 %file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure
98 %your text editor is set to UTF-8 if you want to view this code.
99 %\changes{1.0}{2015-03-31}{Initial release}
100 % Identify module
101 % \begin{macrocode}
102 \ProvidesDateTimeModule{romanian-utf8}[2020/09/21 v1.02]
103 % \end{macrocode}
104 %\begin{macro}{\DTMromanianordinal}
105 % \begin{macrocode}
106 \newcommand*{\DTMromanianordinal}[1]{%
107 \number#1
108 }
109 % \end{macrocode}
110 %\end{macro}
111 %
112 %\begin{macro}{\DTMromanianmonthname}
113 % Romanian month names.
114 % \begin{macrocode}
115 \newcommand*{\DTMromanianmonthname}[1]{%
116 \ifcase#1
117 \or
118 ianuarie%
119 \or
120 februarie%
121 \or
122 martie%
123 \or
124 aprilie%
125 \or
126 mai%
127 \or
128 iunie%
129 \or
130 iulie%
131 \or
132 august%
133 \or
134 septembrie%
135 \or
136 octombrie%
137 \or
138 noiembrie%
139 \or
140 decembrie%
141 \fi
142 }
143 % \end{macrocode}
144 %\end{macro}
145 %
146 %\begin{macro}{\DTMromanianMonthname}
147 % As above but start with a capital.
148 % \begin{macrocode}
149 \newcommand*{\DTMromanianMonthname}[1]{%
150 \ifcase#1
151 \or
152 Ianuarie%
153 \or
154 Februarie%
155 \or
156 Martie%
157 \or
158 Aprilie%
159 \or
160 Mai%
161 \or
162 Iunie%
163 \or
164 Iulie%
165 \or
166 August%
167 \or
168 Septembrie%
169 \or
170 Octombrie%
171 \or
172 Noiembrie%
173 \or
174 Decembrie%
175 \fi
176 }
177 % \end{macrocode}
178 %\end{macro}
179 %
180 %\begin{macro}{\DTMromanianshortmonthname}
181 % Abbreviated Romanian month names.
182 %\changes{1.01}{2017-04-08}{Add abbreviated month names}
183 % \begin{macrocode}
184 \newcommand*{\DTMromanianshortmonthname}[1]{%
185 \ifcase#1
186 \or
187 ian.%
188 \or
189 feb.%
190 \or
191 mart.%
192 \or
193 apr.%
194 \or
195 mai%
196 \or
197 iun.%
198 \or
199 iul.%
200 \or
201 aug.%
202 \or
203 sept.%
204 \or
205 oct.%
206 \or
207 nov.%
208 \or
209 dec.%
210 \fi
211 }
212 % \end{macrocode}
213 %\end{macro}
214 %
215 %\begin{macro}{\DTMromanianshortMonthname}
216 % As above but start with a capital.
217 % \begin{macrocode}
218 \newcommand*{\DTMromanianshortMonthname}[1]{%
219 \ifcase#1
220 \or
221 Ian.%
222 \or
223 Feb.%
224 \or
225 Mart.%
226 \or
227 Apr.%
228 \or
229 Mai%
230 \or
231 Iun.%
232 \or
233 Iul.%
234 \or
235 Aug.%
236 \or
237 Sept.%
238 \or
239 Oct.%
240 \or
241 Nov.%
242 \or
243 Dec.%
244 \fi
245 }
246 % \end{macrocode}
247 %\end{macro}
248 %
249 %\begin{macro}{\DTMromanianweekdayname}
250 % Romanian day of week names.
251 %\changes{1.01}{2017-04-08}{Use T-comma}
252 % \begin{macrocode}
253 \newcommand*{\DTMromanianweekdayname}[1]{%
254 \ifcase#1
255 luni%
256 \or
257 marți%
258 \or
259 miercuri%
260 \or
261 joi%
262 \or
263 vineri%
264 \or
265 sâmbătă%
266 \or
267 duminică%
268 \fi
269 }
270 % \end{macrocode}
271 %\end{macro}
272 %
273 %\begin{macro}{\DTMromanianWeekdayname}
274 % As above but start with a capital.
275 % \begin{macrocode}
276 \newcommand*{\DTMromanianWeekdayname}[1]{%
277 \ifcase#1
278 Luni%
279 \or
280 Marți%
281 \or
282 Miercuri%
283 \or
284 Joi%
285 \or
286 Vineri%
287 \or
288 Sâmbătă%
289 \or
290 Duminică%
291 \fi
292 }
293 % \end{macrocode}
294 %\end{macro}
295 %
296 %\begin{macro}{\DTMromanianshortweekdayname}
297 % Abbreviated Romanian day of week names.
298 %\changes{1.01}{2017-04-08}{Add abbreviated day of week names}
299 % \begin{macrocode}
300 \newcommand*{\DTMromanianshortweekdayname}[1]{%
301 \ifcase#1
302 lun.%
303 \or
304 mar.%
305 \or
306 mie.%
307 \or
308 joi%
309 \or
310 vin.%
311 \or
312 sâm.%
313 \or
314 dum.%
315 \fi
316 }
317 % \end{macrocode}
318 %\end{macro}
319 %
320 %\begin{macro}{\DTMromanianshortWeekdayname}
321 % As above but start with a capital.
322 % \begin{macrocode}
323 \newcommand*{\DTMromanianshortWeekdayname}[1]{%
324 \ifcase#1
325 Lun.%
326 \or
327 Mar.%
328 \or
329 Mie.%
330 \or
331 Joi%
332 \or
333 Vin.%
334 \or
335 Sâm.%
336 \or
337 Dum.%
338 \fi
339 }
340 % \end{macrocode}
341 %\end{macro}
342 %
343 %\iffalse
344 % \begin{macrocode}
345 %</datetime2-romanian-utf8.ldf>
346 % \end{macrocode}
347 %\fi
348 %\iffalse
349 % \begin{macrocode}
350 %<*datetime2-romanian-ascii.ldf>
351 % \end{macrocode}
352 %\fi
353 %\subsection{ASCII}
354 %This file contains the settings that use \LaTeX\ commands for
355 %non-ASCII characters. This should be input if neither XeLaTeX nor
356 %LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with
357 %"utf8", this file should still be used not the
358 %\texttt{datetime2-romanian-utf8.ldf} file as the non-ASCII
359 %characters are made active in that situation and would need
360 %protecting against expansion.
361 %\changes{1.0}{2015-03-31}{Initial release}
362 % Identify module
363 % \begin{macrocode}
364 \ProvidesDateTimeModule{romanian-ascii}[2020/09/21 v1.02]
365 % \end{macrocode}
366 %
367 %\begin{macro}{\DTMromanianordinal}
368 % \begin{macrocode}
369 \newcommand*{\DTMromanianordinal}[1]{%
370 \number#1
371 }
372 % \end{macrocode}
373 %\end{macro}
374 %
375 %\begin{macro}{\DTMromanianmonthname}
376 % Romanian month names.
377 % \begin{macrocode}
378 \newcommand*{\DTMromanianmonthname}[1]{%
379 \ifcase#1
380 \or
381 ianuarie%
382 \or
383 februarie%
384 \or
385 martie%
386 \or
387 aprilie%
388 \or
389 mai%
390 \or
391 iunie%
392 \or
393 iulie%
394 \or
395 august%
396 \or
397 septembrie%
398 \or
399 octombrie%
400 \or
401 noiembrie%
402 \or
403 decembrie%
404 \fi
405 }
406 % \end{macrocode}
407 %\end{macro}
408 %
409 %\begin{macro}{\DTMromanianMonthname}
410 % As above but start with a capital.
411 % \begin{macrocode}
412 \newcommand*{\DTMromanianMonthname}[1]{%
413 \ifcase#1
414 \or
415 Ianuarie%
416 \or
417 Februarie%
418 \or
419 Martie%
420 \or
421 Aprilie%
422 \or
423 Mai%
424 \or
425 Iunie%
426 \or
427 Iulie%
428 \or
429 August%
430 \or
431 Septembrie%
432 \or
433 Octombrie%
434 \or
435 Noiembrie%
436 \or
437 Decembrie%
438 \fi
439 }
440 % \end{macrocode}
441 %\end{macro}
442 %
443 %\begin{macro}{\DTMromanianshortmonthname}
444 % Abbreviated Romanian month names.
445 %\changes{1.01}{2017-04-08}{Add abbreviated month names}
446 % \begin{macrocode}
447 \newcommand*{\DTMromanianshortmonthname}[1]{%
448 \ifcase#1
449 \or
450 ian.%
451 \or
452 feb.%
453 \or
454 mart.%
455 \or
456 apr.%
457 \or
458 mai%
459 \or
460 iun.%
461 \or
462 iul.%
463 \or
464 aug.%
465 \or
466 sept.%
467 \or
468 oct.%
469 \or
470 nov.%
471 \or
472 dec.%
473 \fi
474 }
475 % \end{macrocode}
476 %\end{macro}
477 %
478 %\begin{macro}{\DTMromanianshortMonthname}
479 % As above but start with a capital.
480 % \begin{macrocode}
481 \newcommand*{\DTMromanianshortMonthname}[1]{%
482 \ifcase#1
483 \or
484 Ian.%
485 \or
486 Feb.%
487 \or
488 Mart.%
489 \or
490 Apr.%
491 \or
492 Mai%
493 \or
494 Iun.%
495 \or
496 Iul.%
497 \or
498 Aug.%
499 \or
500 Sept.%
501 \or
502 Oct.%
503 \or
504 Nov.%
505 \or
506 Dec.%
507 \fi
508 }
509 % \end{macrocode}
510 %\end{macro}
511 %
512 %\begin{macro}{\DTMromanianweekdayname}
513 % Romanian day of week names.
514 % \begin{macrocode}
515 \newcommand*{\DTMromanianweekdayname}[1]{%
516 \ifcase#1
517 luni%
518 \or
519 mar\protect\c ti%
520 \or
521 miercuri%
522 \or
523 joi%
524 \or
525 vineri%
526 \or
527 s\protect\^amb\protect\u at\protect\u a%
528 \or
529 duminic\protect\u a%
530 \fi
531 }
532 % \end{macrocode}
533 %\end{macro}
534 %
535 %\begin{macro}{\DTMromanianWeekdayname}
536 % As above but start with a capital.
537 % \begin{macrocode}
538 \newcommand*{\DTMromanianWeekdayname}[1]{%
539 \ifcase#1
540 Luni%
541 \or
542 Mar\protect\c ti%
543 \or
544 Miercuri%
545 \or
546 Joi%
547 \or
548 Vineri%
549 \or
550 S\protect\^amb\protect\u at\protect\u a%
551 \or
552 Duminic\protect\u a%
553 \fi
554 }
555 % \end{macrocode}
556 %\end{macro}
557 %
558 %\begin{macro}{\DTMromanianshortweekdayname}
559 % Abbreviated Romanian day of week names.
560 %\changes{1.01}{2017-04-08}{Add abbreviated day of week names}
561 % \begin{macrocode}
562 \newcommand*{\DTMromanianshortweekdayname}[1]{%
563 \ifcase#1
564 lun.%
565 \or
566 mar.%
567 \or
568 mie.%
569 \or
570 joi%
571 \or
572 vin.%
573 \or
574 s\protect\^am.%
575 \or
576 dum.%
577 \fi
578 }
579 % \end{macrocode}
580 %\end{macro}
581 %
582 %\begin{macro}{\DTMromanianshortWeekdayname}
583 % As above but start with a capital.
584 % \begin{macrocode}
585 \newcommand*{\DTMromanianshortWeekdayname}[1]{%
586 \ifcase#1
587 Lun.%
588 \or
589 Mar.%
590 \or
591 Mie.%
592 \or
593 Joi%
594 \or
595 Vin.%
596 \or
597 S\protect\^am.%
598 \or
599 Dum.%
600 \fi
601 }
602 % \end{macrocode}
603 %\end{macro}
604 %
605 %\iffalse
606 % \begin{macrocode}
607 %</datetime2-romanian-ascii.ldf>
608 % \end{macrocode}
609 %\fi
610 %
611 %\subsection{Main Romanian Module (\texttt{datetime2-romanian.ldf})}
612 %\changes{1.0}{2015-03-31}{Initial release}
613 %
614 %\iffalse
615 % \begin{macrocode}
616 %<*datetime2-romanian.ldf>
617 % \end{macrocode}
618 %\fi
619 %
620 % Identify Module
621 % \begin{macrocode}
622 \ProvidesDateTimeModule{romanian}[2020/09/21 v1.02]
623 % \end{macrocode}
624 % Need to find out if XeTeX or LuaTeX are being used.
625 % \begin{macrocode}
626 \RequirePackage{ifxetex,ifluatex}
627 % \end{macrocode}
628 % XeTeX and LuaTeX natively support UTF-8, so load
629 % \texttt{romanian-utf8} if either of those engines are used
630 % otherwise load \texttt{romanian-ascii}.
631 % \begin{macrocode}
632 \ifxetex
633 \RequireDateTimeModule{romanian-utf8}
634 \else
635 \ifluatex
636 \RequireDateTimeModule{romanian-utf8}
637 \else
638 \RequireDateTimeModule{romanian-ascii}
639 \fi
640 \fi
641 % \end{macrocode}
642 %
643 % Define the \texttt{romanian} style.
644 % The time style is the same as the "default" style
645 % provided by \sty{datetime2}. This may need correcting. For
646 % example, if a 12 hour style similar to the "englishampm" (from the
647 % "english-base" module) is required.
648 %
649 % Allow the user a way of configuring the "romanian" and
650 % "romanian-numeric" styles. This doesn't use the package wide
651 % separators such as
652 % \cs{dtm@datetimesep} in case other date formats are also required.
653 %
654 %\begin{macro}{\DTMromaniandowdaysep}
655 % The separator between the day of week name and the day of month
656 % number for the text format.
657 %\changes{1.01}{2017-04-08}{Add support for showdow}
658 % \begin{macrocode}
659 \newcommand*{\DTMromaniandowdaysep}{\space}
660 % \end{macrocode}
661 %\end{macro}
662 %
663 %\begin{macro}{\DTMromaniandaymonthsep}
664 % The separator between the day and month for the text format.
665 % \begin{macrocode}
666 \newcommand*{\DTMromaniandaymonthsep}{%
667 \DTMtexorpdfstring{\protect~}{\space}%
668 }
669 % \end{macrocode}
670 %\end{macro}
671 %
672 %\begin{macro}{\DTMromanianmonthyearsep}
673 % The separator between the month and year for the text format.
674 % \begin{macrocode}
675 \newcommand*{\DTMromanianmonthyearsep}{\space}
676 % \end{macrocode}
677 %\end{macro}
678 %
679 %\begin{macro}{\DTMromaniandatetimesep}
680 % The separator between the date and time blocks in the full format
681 % (either text or numeric).
682 % \begin{macrocode}
683 \newcommand*{\DTMromaniandatetimesep}{\space}
684 % \end{macrocode}
685 %\end{macro}
686 %
687 %\begin{macro}{\DTMromaniantimezonesep}
688 % The separator between the time and zone blocks in the full format
689 % (either text or numeric).
690 % \begin{macrocode}
691 \newcommand*{\DTMromaniantimezonesep}{\space}
692 % \end{macrocode}
693 %\end{macro}
694 %
695 %\begin{macro}{\DTMromaniandatesep}
696 % The separator for the numeric date format.
697 % \begin{macrocode}
698 \newcommand*{\DTMromaniandatesep}{.}
699 % \end{macrocode}
700 %\end{macro}
701 %
702 %\begin{macro}{\DTMromaniantimesep}
703 % The separator for the numeric time format.
704 % \begin{macrocode}
705 \newcommand*{\DTMromaniantimesep}{:}
706 % \end{macrocode}
707 %\end{macro}
708 %
709 %Provide keys that can be used in \cs{DTMlangsetup} to set these
710 %separators.
711 % \begin{macrocode}
712 \DTMdefkey{romanian}{dowdaysep}{\renewcommand*{\DTMromaniandowdaysep}{#1}}
713 \DTMdefkey{romanian}{daymonthsep}{\renewcommand*{\DTMromaniandaymonthsep}{#1}}
714 \DTMdefkey{romanian}{monthyearsep}{\renewcommand*{\DTMromanianmonthyearsep}{#1}}
715 \DTMdefkey{romanian}{datetimesep}{\renewcommand*{\DTMromaniandatetimesep}{#1}}
716 \DTMdefkey{romanian}{timezonesep}{\renewcommand*{\DTMromaniantimezonesep}{#1}}
717 \DTMdefkey{romanian}{datesep}{\renewcommand*{\DTMromaniandatesep}{#1}}
718 \DTMdefkey{romanian}{timesep}{\renewcommand*{\DTMromaniantimesep}{#1}}
719 % \end{macrocode}
720 %
721 % Define a boolean key that can switch between full and abbreviated
722 % formats for the month and day of week names in the text format.
723 %\changes{1.01}{2017-04-08}{Add support for abbr}
724 % \begin{macrocode}
725 \DTMdefboolkey{romanian}{abbr}[true]{}
726 % \end{macrocode}
727 % The default is the full name.
728 % \begin{macrocode}
729 \DTMsetbool{romanian}{abbr}{false}
730 % \end{macrocode}
731 %
732 % Define a boolean key that determines if the time zone mappings
733 % should be used.
734 % \begin{macrocode}
735 \DTMdefboolkey{romanian}{mapzone}[true]{}
736 % \end{macrocode}
737 % The default is to use mappings.
738 % \begin{macrocode}
739 \DTMsetbool{romanian}{mapzone}{true}
740 % \end{macrocode}
741 %
742 % Define a boolean key that determines if the day of month should be
743 % displayed.
744 % \begin{macrocode}
745 \DTMdefboolkey{romanian}{showdayofmonth}[true]{}
746 % \end{macrocode}
747 % The default is to show the day of month.
748 % \begin{macrocode}
749 \DTMsetbool{romanian}{showdayofmonth}{true}
750 % \end{macrocode}
751 %
752 % Define a boolean key that determines if the year should be
753 % displayed.
754 % \begin{macrocode}
755 \DTMdefboolkey{romanian}{showyear}[true]{}
756 % \end{macrocode}
757 % The default is to show the year.
758 % \begin{macrocode}
759 \DTMsetbool{romanian}{showyear}{true}
760 % \end{macrocode}
761 %
762 % Define the "romanian" style.
763 %\changes{1.01}{2017-04-08}{Add support for abbr and showdow}
764 % \begin{macrocode}
765 \DTMnewstyle
766 {romanian}% label
767 {% date style
768 \renewcommand*\DTMdisplaydate[4]{%
769 \ifDTMshowdow
770 \ifnum##4>-1
771 \DTMifbool{romanian}{abbr}%
772 {\DTMromanianshortweekdayname{##4}}%
773 {\DTMromanianweekdayname{##4}}%
774 \DTMromaniandowdaysep
775 \fi
776 \fi
777 \DTMifbool{romanian}{showdayofmonth}%
778 {%
779 \DTMromanianordinal{##3}%
780 \DTMromaniandaymonthsep
781 }%
782 {}%
783 \DTMifbool{romanian}{abbr}%
784 {\DTMromanianshortmonthname{##2}}%
785 {\DTMromanianmonthname{##2}}%
786 \DTMifbool{romanian}{showyear}%
787 {%
788 \DTMromanianmonthyearsep
789 \number##1 % space intended
790 }%
791 {}%
792 }%
793 \renewcommand*\DTMDisplaydate[4]{%
794 \ifDTMshowdow
795 \ifnum##4>-1
796 \DTMifbool{romanian}{abbr}%
797 {\DTMromanianshortWeekdayname{##4}}%
798 {\DTMromanianWeekdayname{##4}}%
799 \DTMromaniandowdaysep
800 \DTMifbool{romanian}{showdayofmonth}%
801 {%
802 \DTMromanianordinal{##3}%
803 \DTMromaniandaymonthsep
804 }%
805 {}%
806 \DTMifbool{romanian}{abbr}%
807 {\DTMromanianshortmonthname{##2}}%
808 {\DTMromanianmonthname{##2}}%
809 \DTMifbool{romanian}{showyear}%
810 {%
811 \DTMromanianmonthyearsep
812 \number##1 % space intended
813 }%
814 {}%
815 \else
816 \DTMifbool{romanian}{showdayofmonth}
817 {%
818 \DTMromanianordinal{##3}%
819 \DTMromaniandaymonthsep
820 \DTMifbool{romanian}{abbr}%
821 {\DTMromanianshortmonthname{##2}}%
822 {\DTMromanianmonthname{##2}}%
823 }%
824 {%
825 \DTMifbool{romanian}{abbr}%
826 {\DTMromanianshortMonthname{##2}}%
827 {\DTMromanianMonthname{##2}}%
828 }%
829 \DTMifbool{romanian}{showyear}%
830 {%
831 \DTMromanianmonthyearsep
832 \number##1 % space intended
833 }%
834 {}%
835 \fi
836 \else
837 \DTMifbool{romanian}{showdayofmonth}
838 {%
839 \DTMromanianordinal{##3}%
840 \DTMromaniandaymonthsep
841 \DTMifbool{romanian}{abbr}%
842 {\DTMromanianshortmonthname{##2}}%
843 {\DTMromanianmonthname{##2}}%
844 }%
845 {%
846 \DTMifbool{romanian}{abbr}%
847 {\DTMromanianshortMonthname{##2}}%
848 {\DTMromanianMonthname{##2}}%
849 }%
850 \DTMifbool{romanian}{showyear}%
851 {%
852 \DTMromanianmonthyearsep
853 \number##1 % space intended
854 }%
855 {}%
856 \fi
857 }%
858 }%
859 {% time style (ignores seconds)
860 \renewcommand*\DTMdisplaytime[3]{%
861 \number##1
862 \DTMromaniantimesep\DTMtwodigits{##2}%
863 }%
864 }%
865 {% zone style
866 \DTMresetzones
867 \DTMromanianzonemaps
868 \renewcommand*{\DTMdisplayzone}[2]{%
869 \DTMifbool{romanian}{mapzone}%
870 {\DTMusezonemapordefault{##1}{##2}}%
871 {%
872 \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
873 \ifDTMshowzoneminutes\DTMromaniantimesep\DTMtwodigits{##2}\fi
874 }%
875 }%
876 }%
877 {% full style
878 \renewcommand*{\DTMdisplay}[9]{%
879 \ifDTMshowdate
880 \DTMdisplaydate{##1}{##2}{##3}{##4}%
881 \DTMromaniandatetimesep
882 \fi
883 \DTMdisplaytime{##5}{##6}{##7}%
884 \ifDTMshowzone
885 \DTMromaniantimezonesep
886 \DTMdisplayzone{##8}{##9}%
887 \fi
888 }%
889 \renewcommand*{\DTMDisplay}[9]{%
890 \ifDTMshowdate
891 \DTMDisplaydate{##1}{##2}{##3}{##4}%
892 \DTMromaniandatetimesep
893 \fi
894 \DTMdisplaytime{##5}{##6}{##7}%
895 \ifDTMshowzone
896 \DTMromaniantimezonesep
897 \DTMdisplayzone{##8}{##9}%
898 \fi
899 }%
900 }%
901 % \end{macrocode}
902 %
903 % Define numeric style.
904 % \begin{macrocode}
905 \DTMnewstyle
906 {romanian-numeric}% label
907 {% date style
908 \renewcommand*\DTMdisplaydate[4]{%
909 \DTMifbool{romanian}{showdayofmonth}%
910 {%
911 \number##3 % space intended
912 \DTMromaniandatesep
913 }%
914 {}%
915 \number##2 % space intended
916 \DTMifbool{romanian}{showyear}%
917 {%
918 \DTMromaniandatesep
919 \number##1 % space intended
920 }%
921 {}%
922 }%
923 \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
924 }%
925 {% time style
926 \renewcommand*\DTMdisplaytime[3]{%
927 \number##1
928 \DTMromaniantimesep\DTMtwodigits{##2}%
929 \ifDTMshowseconds\DTMromaniantimesep\DTMtwodigits{##3}\fi
930 }%
931 }%
932 {% zone style
933 \DTMresetzones
934 \DTMromanianzonemaps
935 \renewcommand*{\DTMdisplayzone}[2]{%
936 \DTMifbool{romanian}{mapzone}%
937 {\DTMusezonemapordefault{##1}{##2}}%
938 {%
939 \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
940 \ifDTMshowzoneminutes\DTMromaniantimesep\DTMtwodigits{##2}\fi
941 }%
942 }%
943 }%
944 {% full style
945 \renewcommand*{\DTMdisplay}[9]{%
946 \ifDTMshowdate
947 \DTMdisplaydate{##1}{##2}{##3}{##4}%
948 \DTMromaniandatetimesep
949 \fi
950 \DTMdisplaytime{##5}{##6}{##7}%
951 \ifDTMshowzone
952 \DTMromaniantimezonesep
953 \DTMdisplayzone{##8}{##9}%
954 \fi
955 }%
956 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
957 }
958 % \end{macrocode}
959 %
960 %\begin{macro}{\DTMromanianzonemaps}
961 % The time zone mappings are set through this command, which can be
962 % redefined if extra mappings are required or mappings need to be
963 % removed.
964 % \begin{macrocode}
965 \newcommand*{\DTMromanianzonemaps}{%
966 \DTMdefzonemap{02}{00}{EET}%
967 \DTMdefzonemap{03}{00}{EEST}%
968 }
969 % \end{macrocode}
970 %\end{macro}
971
972 % Switch style according to the \opt{useregional} setting.
973 % \begin{macrocode}
974 \DTMifcaseregional
975 {}% do nothing
976 {\DTMsetstyle{romanian}}
977 {\DTMsetstyle{romanian-numeric}}
978 % \end{macrocode}
979 %
980 % Redefine \cs{dateromanian} (or \cs{date}\meta{dialect}) to prevent
981 % \sty{babel} from resetting \cs{today}. (For this to work,
982 % \sty{babel} must already have been loaded if it's required.)
983 %\changes{1.02}{2020-09-21}{removed spurious space}
984 % \begin{macrocode}
985 \ifcsundef{date\CurrentTrackedDialect}
986 {%
987 \ifundef\dateromanian
988 {% do nothing
989 }%
990 {%
991 \def\dateromanian{%
992 \DTMifcaseregional
993 {}% do nothing
994 {\DTMsetstyle{romanian}}%
995 {\DTMsetstyle{romanian-numeric}}%
996 }%
997 }%
998 }%
999 {%
1000 \csdef{date\CurrentTrackedDialect}{%
1001 \DTMifcaseregional
1002 {}% do nothing
1003 {\DTMsetstyle{romanian}}%
1004 {\DTMsetstyle{romanian-numeric}}%
1005 }%
1006 }%
1007 % \end{macrocode}
1008 %\iffalse
1009 % \begin{macrocode}
1010 %</datetime2-romanian.ldf>
1011 % \end{macrocode}
1012 %\fi
1013 %\Finale
1014 \endinput