Debian Codegraph @

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

raw
1 % \iffalse meta-comment
2 % !TeX program = xelatex
3 %<*internal>
4 \iffalse
5 %</internal>
6 %<*readme>
7 ----------------------------------------------------------------
8
9 Ukrainian Language Module for datetime2 Package
10
11 Author: Nicola L. C. Talbot (inactive)
12 Current maintainer: Sergiy M. Ponomarenko <[email protected]>.
13
14 Licence: LPPL
15
16 Required Packages: tracklang
17
18
19 1. INSTALLATION
20
21 xelatex datetime2-ukrainian.ins
22
23 Move all *.ldf files to
24 TEXMF/tex/latex/datetime2-ukrainian/
25
26 2. USAGE
27
28 2.1.1 PDFLATeX, LaTeX
29
30 \documentclass{article}
31 \usepackage[ukrainian]{datetime2}
32 \begin{document}
33 \today
34 \end{document}
35
36 \documentclass[ukrainian]{article}
37 \usepackage{babel}
38 \usepackage[useregional]{datetime2}
39 \begin{document}
40 \today
41 \end{document}
42
43 2.1.2 Lua(Xe)LaTeX
44
45 \documentclass{article}
46 \usepackage{polyglossia}
47 \setmainlanguage{ukrainian}
48 \usepackage[ukrainian]{datetime2}
49 \begin{document}
50 \today
51 \end{document}
52
53 3. DOCUMENTATION
54
55 See datetime2-ukrainian.pdf for more information.
56
57 This material is subject to the LaTeX Project Public License.
58 See http://www.ctan.org/license/lppl1.3 for the details of that license.
59
60 ----------------------------------------------------------------
61 %</readme>
62 %<*internal>
63 \fi
64 \def\nameofplainTeX{plain}
65 \ifx\fmtname\nameofplainTeX\else
66 \expandafter\begingroup
67 \fi
68 %</internal>
69 %<*install>
70 \input docstrip.tex
71 \keepsilent
72 \askforoverwritefalse
73 \preamble
74 ----------------------------------------------------------------
75
76 This material is subject to the LaTeX Project Public License.
77 See http://www.ctan.org/license/lppl1.3 for the details of that
78 license.
79
80 ----------------------------------------------------------------
81
82 \endpreamble
83 \postamble
84
85 ----------------------------------------------------------------
86 datetime2-ukrainian.dtx
87 Copyright 2015 Nicola Talbot
88 2017 Sergiy M. Ponomarenko
89
90 This work may be distributed and/or modified under the
91 conditions of the LaTeX Project Public License, either version 1.3
92 of this license of (at your option) any later version.
93 The latest version of this license is in
94 http://www.latex-project.org/lppl.txt
95 and version 1.3 or later is part of all distributions of LaTeX
96 version 2005/12/01 or later.
97
98 This work has the LPPL maintenance status `inactive'.
99
100
101 This work consists of the files datetime2-ukrainian.dtx
102 datetime2-ukrainian.ins
103 datetime2-ukrainian-utf8.ldf,
104 datetime2-ukrainian-ascii.ldf
105 datetime2-ukrainian.ldf.
106 ----------------------------------------------------------------
107
108 \endpostamble
109
110 \usedir{tex/latex/datetime2-ukrainian}
111 \askforoverwritefalse
112
113 \generate
114 {%
115 \file
116 {datetime2-ukrainian-utf8.ldf}%
117 {%
118 \usepreamble\defaultpreamble
119 \usepostamble\defaultpostamble
120 \from{datetime2-ukrainian.dtx}{datetime2-ukrainian-utf8.ldf,package}%
121 }%
122 }
123
124 \generate
125 {%
126 \file
127 {datetime2-ukrainian-ascii.ldf}%
128 {%
129 \usepreamble\defaultpreamble
130 \usepostamble\defaultpostamble
131 \from{datetime2-ukrainian.dtx}{datetime2-ukrainian-ascii.ldf,package}%
132 }%
133 }
134
135 \generate
136 {%
137 \file
138 {datetime2-ukrainian.ldf}%
139 {%
140 \usepreamble\defaultpreamble
141 \usepostamble\defaultpostamble
142 \from{datetime2-ukrainian.dtx}{datetime2-ukrainian.ldf,package}%
143 }%
144 }
145 %</install>
146 %<install>\endbatchfile
147 %<*internal>
148 \usedir{source/latex/democls}
149 \generate{
150 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
151 }
152 \nopreamble\nopostamble
153 \usedir{doc/latex/democls}
154 \generate{
155 \file{README.md}{\from{\jobname.dtx}{readme}}
156 }
157 \ifx\fmtname\nameofplainTeX
158 \expandafter\endbatchfile
159 \else
160 \expandafter\endgroup
161 \fi
162 %</internal>
163
164 %<*driver>
165 \documentclass{ltxdoc}
166 %%
167 %% This document should be compiled by
168 %% XeLaTeX or LuaLaTex
169 %%
170 \usepackage[%
171 a4paper,%
172 footskip=1cm,%
173 headsep=0.3cm,%
174 top=2cm,
175 bottom=2cm,
176 left=6cm,
177 right=2cm,
178 ]{geometry}
179
180 \usepackage{fontspec}
181 \defaultfontfeatures{Ligatures={TeX}}
182 \setmainfont{CMU Serif}
183 \setsansfont{CMU Sans Serif}
184 \setmonofont{CMU Typewriter Text}
185
186 \usepackage[dvipsnames,usenames]{xcolor}
187
188 \definecolor{thered} {rgb}{0.65,0.04,0.07}
189 \definecolor{thegreen}{rgb}{0.06,0.44,0.08}
190 \definecolor{thegrey} {gray}{0.8}
191 \definecolor{theshade}{rgb}{1,1,0.97}
192 \definecolor{theframe}{gray}{0.6}
193 \definecolor{theblue}{cmyk}{1.00, 0.50, 0.00, 0.40}
194 % ====================================
195
196 % --------------------------------------------------
197 \IfFileExists{listings.sty}{
198 \usepackage{listings}
199 \lstset{
200 gobble=1,
201 columns=flexible,
202 keepspaces,
203 basicstyle=\MacroFont,
204 keywords=[0]{\selectlanguage,\foreignlanguage
205 ,\babelhyphen,\babelhyphenation
206 ,\lefthyphenmin,\righthyphenmin
207 ,\StartBabelCommands,\SetString,\EndBabelCommands,\shorthandoff,\shorthandon
208 ,\languageshorthands,\useshorthands,\defineshorthand
209 ,\AddBabelHook,\SetStringLoop,\SetCase,\AfterBabelLanguage
210 ,\defaultfontfeatures,\setmainfont,\setsansfont,\setmonofont
211 ,\Ukrainian,\cyrdash,\cdash
212 ,\cyr,\cyrillictext,\textcyrillic,\cyrillicencoding
213 ,\addto,\captionsukrainian,\dateukrainian,\noextrasukrainian,\extrasukrainian
214 ,\languageattribute
215 ,\ch,\sh,\tg,\ctg,\arctg,\arcctg\,\th,\cth,\cosec
216 ,\dq
217 ,\XeTeXinputencoding
218 ,\setmainlanguage
219 ,\setotherlanguage
220 }
221 ,keywordstyle=[0]\color{thered}
222 ,keywords=[1]{main,ukrainian,english,german,frenchb
223 ,shorthands,extrasenglish
224 ,stringprocess,afterextras
225 ,soft,empty,nobreak,hard
226 ,Renderer,Ligatures
227 ,T1,T2A,lutf8,utf8
228 ,fontspec,babel,inputenc,fontenc,useregional
229 },
230 keywordstyle=[1]\color{thegreen},
231 comment=[l]\%,
232 commentstyle=\color{thegrey}\itshape,
233 alsoother={0123456789_},
234 frame=single,
235 backgroundcolor=\color{theshade},
236 rulecolor=\color{theframe},
237 framerule=\fboxrule,
238 }
239 \let\verbatim\relax
240 \lstnewenvironment{verbatim}[1][]{\lstset{##1}}{}
241 \AtBeginDocument{%
242 \DeleteShortVerb{\|}%
243 \lstMakeShortInline|%
244 }
245 }{}
246 \def\PrintDescribeMacro#1{%
247 \strut\MacroFont\color{thered}\normalsize\string#1}
248 \def\Describe#1{%
249 \par\penalty-500\vskip3ex\noindent
250 \DescribeMacro{#1}\args}
251 \def\DescribeOther{\vskip-5.8ex\Describe}
252 \makeatletter
253 \def\args#1{%
254 \def\bbl@tempa{#1}%
255 \ifx\bbl@tempa\@empty\else#1\vskip1ex\fi\ignorespaces}
256 \makeatother
257 % ====================================
258 \EnableCrossrefs
259 %\DisableCrossrefs % Say \DisableCrossrefs if index is ready
260 \CodelineIndex % Index code by line number
261 \RecordChanges % Gather update information
262 %\PageIndex % Index code by page number
263 % ====================================
264 \usepackage{alltt}
265
266
267 \usepackage[colorlinks,
268 bookmarks,
269 hyperindex=false,
270 pdfauthor={Sergiy M. Ponomarenko},
271 pdftitle={datetime2.sty Ukrainian Module}]{hyperref}
272
273
274 \renewcommand*{\usage}[1]{\hyperpage{#1}}
275 \renewcommand*{\main}[1]{\hyperpage{#1}}
276 \IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
277 \setcounter{IndexColumns}{2}
278
279 \newcommand*{\sty}[1]{\textsf{#1}}
280 \newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
281
282 \RecordChanges
283 \PageIndex
284 \CodelineNumbered
285
286 \begin{document}
287 \DocInput{datetime2-ukrainian.dtx}
288 \end{document}
289 %</driver>
290 % \fi
291 %
292 %
293 % \GetFileInfo{\jobname.dtx}
294 %
295 % \def\fileversion{1.2a}
296 % \def\filedate{2018/04/15}
297 %
298 %
299 %\MakeShortVerb{"}
300 %
301 %\title{\bfseries Ukrainian Module for datetime2 Package}
302 %\author{Nicola L. C. Talbot \and Sergiy M. Ponomarenko}
303 %\date{2018/04/15 (1.2a)}
304 %\maketitle
305 %\tableofcontents
306 %
307 %\begin{abstract}
308 % This is the Ukrainian language module for the \sty{datetime2}
309 % package. If you want to use the settings in this module you must
310 % install it in addition to installing \sty{datetime2}. If you use
311 % \sty{babel} or \sty{polyglossia}, you will need this module to
312 % prevent them from redefining \cs{today}. The \sty{datetime2}
313 % \opt{useregional} setting must be set to "text" or "numeric"
314 % for the language styles to be set.
315 % Alternatively, you can set the style in the document using
316 % \cs{DTMsetstyle}, but this may be changed by \cs{dateukrainian}
317 % depending on the value of the \opt{useregional} setting.
318 %\end{abstract}
319 %
320 %\StopEventually{%
321 %\clearpage
322 %\phantomsection
323 %\addcontentsline{toc}{section}{Change History}%
324 %\PrintChanges
325 %\addcontentsline{toc}{section}{\indexname}%
326 %\PrintIndex}
327 % \section{Usage}
328 %
329 % \subsection{\LaTeX}
330 %
331 % When user's document is compiled with \texttt{latex.exe} or \texttt{pdflatex.exe},
332 % recommended set of packages includes the \texttt{inputenc} and \texttt{fontenc}
333 % packages.
334 %
335 %
336 % \begin{verbatim}
337 % \usepackage[T1,T2A]{fontenc}
338 % \usepackage[utf8]{inputenc}
339 % \usepackage[english,ukrainian]{babel}
340 % \usepackage[useregional]{datetime2}
341 % \end{verbatim}
342 %
343 %
344 %
345 % \subsection{Lua(Xe)\LaTeX}
346 %
347 % \subsubsection{Usage with \texttt{babel}}
348 %
349 % To invoke Unicode mode, one needs to load the \texttt{fontspec} package instead
350 % of \texttt{inputenc} and \texttt{fontspec} and explicitly indicate which True Type
351 % or Open Type fonts should be used for romanic, sans-serif and monospaced types.
352 % The following example shows how to load Computer Modern Unicode (CMU) fonts,
353 % which is a part of all modern \LaTeX\ distributions with \texttt{babel} package:
354 % \begin{verbatim}
355 % \usepackage{fontspec}
356 % \defaultfontfeatures{Renderer=Basic,Ligatures={TeX}}
357 % \setmainfont{CMU Serif}
358 % \setsansfont{CMU Sans Serif}
359 % \setmonofont{CMU Typewriter Text}
360 % \usepackage[english,ukrainian]{babel}
361 % \usepackage[useregional]{datetime2}
362 % \end{verbatim}
363 %
364 % Here |Renderer=Basic,Ligatures={TeX}| activates ligatures which are existed
365 % in \LaTeX.
366 %
367 % \subsubsection{Usage with \texttt{polyglossia}}
368 %
369 % \begin{verbatim}
370 % \usepackage{polyglossia}
371 % \defaultfontfeatures{Renderer=Basic,Ligatures={TeX}}
372 % \setmainlanguage{ukrainian}
373 % \setotherlanguage{english}
374 % \setmainfont{CMU Serif}
375 % \setsansfont{CMU Sans Serif}
376 % \setmonofont{CMU Typewriter Text}
377 % \usepackage[english,ukrainian]{babel}
378 % \usepackage[useregional]{datetime2}
379 % \end{verbatim}
380 %
381 % If ohe need use month name in nominative form, it sould be able to switch between
382 % the different cases using \cs{DTMlangsetup}. For example:
383 % \begin{verbatim}
384 % % Default is genitive
385 % \today
386 % \DTMlangsetup[ukrainian]{month=nominative}
387 % % Now \today in nominative
388 % \today
389 % \end{verbatim}
390 %
391 % For more information see documentation on \href{https://www.ctan.org/pkg/datetime2}{\texttt{datetime2}}.
392 %\section{Implementetion}
393 %\iffalse
394 % \begin{macrocode}
395 %<*datetime2-ukrainian-utf8.ldf>
396 % \end{macrocode}
397 %\fi
398 %\subsection{UTF-8}
399 % This file contains the settings that use UTF-8 characters. This
400 % file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure
401 % your text editor is set to UTF-8 if you want to view this code.
402 % \changes{1.0}{2015-04-01}{Initial release}
403 % Identify module
404 % \begin{macrocode}
405 \ProvidesDateTimeModule{ukrainian-utf8}[2017/06/13 1.2]
406 % \end{macrocode}
407 %\begin{macro}{\DTMukrainianordinal}
408 % \begin{macrocode}
409 \newcommand*{\DTMukrainianordinal}[1]{%
410 \number#1
411 }
412 % \end{macrocode}
413 %\end{macro}
414 %
415 %\begin{macro}{\DTMukrainianyear}
416 % \begin{macrocode}
417 \newcommand*{\DTMukrainianyear}[1]{%
418 \number#1
419 \DTMtexorpdfstring{\protect~}{\space}р.%
420 }
421 % \end{macrocode}
422 %\end{macro}
423 %
424 %\changes{1.2}{2017/06/13}{Add nominative month names (capitalize and common)}
425 %
426 %\begin{macro}{\DTMukrainiannominativemonthname}
427 %
428 % ======= Ukrainian month names in nominative =======
429 %
430 % \begin{macrocode}
431 \newcommand*{\DTMukrainiannominativemonthname}[1]{%
432 \ifcase#1
433 \or
434 січень%
435 \or
436 лютий%
437 \or
438 березень%
439 \or
440 квітень%
441 \or
442 травень%
443 \or
444 червень%
445 \or
446 липень%
447 \or
448 серпень%
449 \or
450 вересень%
451 \or
452 жовтень%
453 \or
454 листопад%
455 \or
456 грудень%
457 \fi
458 }
459 % \end{macrocode}
460 %\end{macro}
461 %
462 %\begin{macro}{\DTMukrainiannominativeMonthname}
463 %
464 % ======= Ukrainian Capitalized month names in nominative =======
465 %
466 % \begin{macrocode}
467 \newcommand*{\DTMukrainiannominativeMonthname}[1]{%
468 \ifcase#1
469 \or
470 Січень%
471 \or
472 Лютий%
473 \or
474 Березень%
475 \or
476 Квітень%
477 \or
478 Травень%
479 \or
480 Червень%
481 \or
482 Липень%
483 \or
484 Серпень%
485 \or
486 Вересень%
487 \or
488 Жовтень%
489 \or
490 Листопад%
491 \or
492 Грудень%
493 \fi
494 }
495 % \end{macrocode}
496 %\end{macro}
497 %
498 %\begin{macro}{\DTMukrainiangenitivemonthname}
499 %
500 % ======= Ukrainian month names in genitive =======
501 %
502 % \begin{macrocode}
503 \newcommand*{\DTMukrainiangenitivemonthname}[1]{%
504 \ifcase#1
505 \or
506 січня%
507 \or
508 лютого%
509 \or
510 березня%
511 \or
512 квітня%
513 \or
514 травня%
515 \or
516 червня%
517 \or
518 липня%
519 \or
520 серпня%
521 \or
522 вересня%
523 \or
524 жовтня%
525 \or
526 листопада%
527 \or
528 грудня%
529 \fi
530 }
531 % \end{macrocode}
532 %\end{macro}
533 %
534 %\begin{macro}{\DTMukrainiangenitiveMonthname}
535 %
536 % ======= Ukrainian Capitalized month names in genitive =======
537 %
538 % \begin{macrocode}
539 \newcommand*{\DTMukrainiangenitiveMonthname}[1]{%
540 \ifcase#1
541 \or
542 Січня%
543 \or
544 Лютого%
545 \or
546 Березня%
547 \or
548 Квітня%
549 \or
550 Травня%
551 \or
552 Червня%
553 \or
554 Липня%
555 \or
556 Серпня%
557 \or
558 Вересня%
559 \or
560 Жовтня%
561 \or
562 Листопада%
563 \or
564 Грудня%
565 \fi
566 }
567 % \end{macrocode}
568 %\end{macro}
569 % \changes{1.2}{2017/06/13}{Set as default genitive form of month name}
570 % Now we set \cs{DTMukrainiangenitiveMonthname} and \cs{DTMukrainiangenitivemonthname} as default setting.
571 % \begin{macrocode}
572 \newcommand*{\DTMukrainianmonthname}{\DTMukrainiangenitivemonthname}% default
573 \newcommand*{\DTMukrainianMonthname}{\DTMukrainiangenitiveMonthname}% default
574 % \end{macrocode}
575 %
576 %\begin{macro}{\DTMukrainianshortmonthname}%
577 %
578 % ======= Abbreviated Ukrainian short month names =======
579 %
580 %\changes{v1.1}{2017/06/11}{Add abbreviated month names}
581 % \begin{macrocode}
582 \newcommand*{\DTMukrainianshortmonthname}[1]{%
583 \ifcase#1
584 \or
585 січ.%
586 \or
587 лют.%
588 \or
589 бер.%
590 \or
591 квіт.%
592 \or
593 трав%
594 \or
595 черв.%
596 \or
597 лип.%
598 \or
599 серп.%
600 \or
601 вер.%
602 \or
603 жовт.%
604 \or
605 листоп.%
606 \or
607 груд.%
608 \fi
609 }
610 % \end{macrocode}
611 %\end{macro}
612 %
613 %\begin{macro}{\DTMukrainianshortMonthname}
614 %
615 % ======= Abbreviated Ukrainian Capitalized short month names =======
616 %
617 % \begin{macrocode}
618 \newcommand*{\DTMukrainianshortMonthname}[1]{%
619 \ifcase#1
620 \or
621 Січ.%
622 \or
623 Лют.%
624 \or
625 Бер.%
626 \or
627 Квіт.%
628 \or
629 Трав%
630 \or
631 Черв.%
632 \or
633 Лип.%
634 \or
635 Серп.%
636 \or
637 Вер.%
638 \or
639 Жовт.%
640 \or
641 Листоп.%
642 \or
643 Груд.%
644 \fi
645 }
646 % \end{macrocode}
647 %\end{macro}
648 %
649 % \changes{v1.1}{2017/06/11}{Adding Ukrainian week days}
650 %\begin{macro}{\DTMukrainianweekdayname}
651 %
652 % ======= Ukrainian day of week names =======
653 %
654 % \begin{macrocode}
655 \newcommand*{\DTMukrainianweekdayname}[1]{%
656 \ifcase#1
657 понеділок%
658 \or
659 вівторок%
660 \or
661 середа%
662 \or
663 четвер%
664 \or
665 п'ятниця%
666 \or
667 субота%
668 \or
669 неділя%
670 \fi
671 }
672 % \end{macrocode}
673 %\end{macro}
674 %
675 %\begin{macro}{\DTMukrainianWeekdayname}
676 %
677 % ======= Ukrainian Capitalized day of week names =======
678 %
679 % \begin{macrocode}
680 \newcommand*{\DTMukrainianWeekdayname}[1]{%
681 \ifcase#1
682 Понеділок%
683 \or
684 Вівторок%
685 \or
686 Середа%
687 \or
688 Четвер%
689 \or
690 П'ятниця%
691 \or
692 Субота%
693 \or
694 Неділя%
695 \fi
696 }
697 % \end{macrocode}
698 %\end{macro}
699 %
700 %\begin{macro}{\DTMukrainianshortweekdayname}
701 %
702 %
703 % ======= Abbreviated Ukrainian day of week names =======
704 %
705 %\changes{v1.1}{2017/06/11}{Add abbreviated day of week names}
706 % \begin{macrocode}
707 \newcommand*{\DTMukrainianshortweekdayname}[1]{%
708 \ifcase#1
709 пн.%
710 \or
711 вт.%
712 \or
713 ср.%
714 \or
715 чт%
716 \or
717 пт.%
718 \or
719 сб.%
720 \or
721 нд.%
722 \fi
723 }
724 % \end{macrocode}
725 %\end{macro}
726 %
727 %\begin{macro}{\DTMukrainianshortWeekdayname}
728 %
729 % ======= Abbreviated Ukrainian Capitalized day of week names =======
730 %
731 % \begin{macrocode}
732 \newcommand*{\DTMukrainianshortWeekdayname}[1]{%
733 \ifcase#1
734 Пн.%
735 \or
736 Вт.%
737 \or
738 Ср.%
739 \or
740 Чт%
741 \or
742 Пт.%
743 \or
744 Сб.%
745 \or
746 Нд.%
747 \fi
748 }
749 % \end{macrocode}
750 %\end{macro}
751 %
752 %
753 %\iffalse
754 % \begin{macrocode}
755 %</datetime2-ukrainian-utf8.ldf>
756 % \end{macrocode}
757 %\fi
758 %\iffalse
759 % \begin{macrocode}
760 %<*datetime2-ukrainian-ascii.ldf>
761 % \end{macrocode}
762 %\fi
763 %\subsection{ASCII}
764 %This file contains the settings that use \LaTeX\ commands for
765 %non-ASCII characters. This should be input if neither XeLaTeX nor
766 %LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with
767 %"utf8", this file should still be used not the
768 %\texttt{datetime2-ukrainian-utf8.ldf} file as the non-ASCII
769 %characters are made active in that situation and would need
770 %protecting against expansion.
771 %\changes{1.0}{2015-04-01}{Initial release}
772 % Identify module
773 % \begin{macrocode}
774 \ProvidesDateTimeModule{ukrainian-ascii}[2017/06/13 1.2]
775 % \end{macrocode}
776 %
777 %I f abbreviated dates are supported, short month names should be
778 % likewise provided.
779 %\begin{macro}{\DTMukrainianordinal}
780 % \begin{macrocode}
781 \newcommand*{\DTMukrainianordinal}[1]{%
782 \number#1
783 }
784 % \end{macrocode}
785 %\end{macro}
786 %
787 %\begin{macro}{\DTMukrainianyear}
788 % \begin{macrocode}
789 \newcommand*{\DTMukrainianyear}[1]{%
790 \number#1
791 \DTMtexorpdfstring{\protect~}{\space}\protect\cyrr.%
792 }
793 % \end{macrocode}
794 %\end{macro}
795 %
796 %\begin{macro}{\DTMukrainiannominativemonthname}
797 %
798 %
799 % ======= Ukrainian month names in nominative =======
800 %
801 %
802 % \begin{macrocode}
803 \newcommand*{\DTMukrainiannominativemonthname}[1]{%
804 \ifcase#1
805 \or
806 \protect\cyrs\protect\cyrii\protect\cyrch\protect\cyre\protect\cyrn\protect\cyrsftsn
807 \or
808 \protect\cyrl\protect\cyryu\protect\cyrt\protect\cyri\protect\cyrishrt
809 \or
810 \protect\cyrb\protect\cyre\protect\cyrr\protect\cyre\protect\cyrz
811 \protect\cyre\protect\cyrn\protect\cyrsftsn
812 \or
813 \protect\cyrk\protect\cyrv\protect\cyrii\protect\cyrt\protect\cyre\protect\cyrn\protect\cyrsftsn
814 \or
815 \protect\cyrt\protect\cyrr\protect\cyra\protect\cyrv\protect\cyre\protect\cyrn\protect\cyrsftsn
816 \or
817 \protect\cyrch\protect\cyre\protect\cyrr\protect\cyrv\protect\cyre\protect\cyrn\protect\cyrsftsn
818 \or
819 \protect\cyrl\protect\cyri\protect\cyrp\protect\cyre\protect\cyrn\protect\cyrsftsn
820 \or
821 \protect\cyrs\protect\cyre\protect\cyrr\protect\cyrp\protect\cyre\protect\cyrn\protect\cyrsftsn
822 \or
823 \protect\cyrv\protect\cyre\protect\cyrr\protect\cyre\protect\cyrs
824 \protect\cyre\protect\cyrn\protect\cyrsftsn
825 \or
826 \protect\cyrzh\protect\cyro\protect\cyrv\protect\cyrt\protect\cyre\protect\cyrn\protect\cyrsftsn
827 \or
828 \protect\cyrl\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
829 \protect\cyrp\protect\cyra\protect\cyrd
830 \or
831 \protect\cyrg\protect\cyrr\protect\cyru\protect\cyrd\protect\protect\cyre\protect\cyrn\protect\cyrsftsn
832 \fi
833 }
834 % \end{macrocode}
835 %\end{macro}
836 %
837 %\begin{macro}{\DTMukrainiannominativeMonthname}
838 %
839 %
840 % ======= Ukrainian Capitalized month names in nominative =======
841 %
842 %
843 % \begin{macrocode}
844 \newcommand*{\DTMukrainiannominativeMonthname}[1]{%
845 \ifcase#1
846 \or
847 \protect\CYRS\protect\cyrii\protect\cyrch\protect\cyre\protect\cyrn\protect\cyrsftsn
848 \or
849 \protect\CYRL\protect\cyryu\protect\cyrt\protect\cyri\protect\cyrishrt
850 \or
851 \protect\CYRB\protect\cyre\protect\cyrr\protect\cyre\protect\cyrz
852 \protect\cyre\protect\cyrn\protect\cyrsftsn
853 \or
854 \protect\CYRK\protect\cyrv\protect\cyrii\protect\cyrt\protect\cyre\protect\cyrn\protect\cyrsftsn
855 \or
856 \protect\CYRT\protect\cyrr\protect\cyra\protect\cyrv\protect\cyre\protect\cyrn\protect\cyrsftsn
857 \or
858 \protect\CYRCH\protect\cyre\protect\cyrr\protect\cyrv\protect\cyre\protect\cyrn\protect\cyrsftsn
859 \or
860 \protect\CYRL\protect\cyri\protect\cyrp\protect\cyre\protect\cyrn\protect\cyrsftsn
861 \or
862 \protect\CYRS\protect\cyre\protect\cyrr\protect\cyrp\protect\cyre\protect\cyrn\protect\cyrsftsn
863 \or
864 \protect\CYRV\protect\cyre\protect\cyrr\protect\cyre\protect\cyrs
865 \protect\CYRE\protect\cyrn\protect\cyrsftsn
866 \or
867 \protect\CYRZH\protect\cyro\protect\cyrv\protect\cyrt\protect\cyre\protect\cyrn\protect\cyrsftsn
868 \or
869 \protect\CYRL\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
870 \protect\cyrp\protect\cyra\protect\cyrd
871 \or
872 \protect\CYRG\protect\cyrr\protect\cyru\protect\cyrd\protect\protect\cyre\protect\cyrn\protect\cyrsftsn
873 \fi
874 }
875 % \end{macrocode}
876 %\end{macro}
877 %
878 %\begin{macro}{\DTMukrainiangenitivemonthname}
879 %
880 % ======= Ukrainian month names in genitive =======
881 %
882 % \begin{macrocode}
883 \newcommand*{\DTMukrainiangenitivemonthname}[1]{%
884 \ifcase#1
885 \or
886 \protect\cyrs\protect\cyrii\protect\cyrch\protect\cyrn\protect\cyrya
887 \or
888 \protect\cyrl\protect\cyryu\protect\cyrt\protect\cyro\protect\cyrg
889 \protect\cyro
890 \or
891 \protect\cyrb\protect\cyre\protect\cyrr\protect\cyre\protect\cyrz
892 \protect\cyrn\protect\cyrya
893 \or
894 \protect\cyrk\protect\cyrv\protect\cyrii\protect\cyrt\protect\cyrn
895 \protect\cyrya
896 \or
897 \protect\cyrt\protect\cyrr\protect\cyra\protect\cyrv\protect\cyrn
898 \protect\cyrya
899 \or
900 \protect\cyrch\protect\cyre\protect\cyrr\protect\cyrv\protect\cyrn
901 \protect\cyrya
902 \or
903 \protect\cyrl\protect\cyri\protect\cyrp\protect\cyrn\protect\cyrya
904 \or
905 \protect\cyrs\protect\cyre\protect\cyrr\protect\cyrp\protect\cyrn
906 \protect\cyrya
907 \or
908 \protect\cyrv\protect\cyre\protect\cyrr\protect\cyre\protect\cyrs
909 \protect\cyrn\protect\cyrya
910 \or
911 \protect\cyrzh\protect\cyro\protect\cyrv\protect\cyrt\protect\cyrn
912 \protect\cyrya
913 \or
914 \protect\cyrl\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
915 \protect\cyrp\protect\cyra\protect\cyrd\protect\cyra
916 \or
917 \protect\cyrg\protect\cyrr\protect\cyru\protect\cyrd\protect\cyrn
918 \protect\cyrya
919 \fi
920 }
921 % \end{macrocode}
922 %\end{macro}
923 %
924 %\begin{macro}{\DTMukrainiangenitiveMonthname}
925 %
926 % ======= Ukrainian Capitalized month names in genitive =======
927 %
928 % \begin{macrocode}
929 \newcommand*{\DTMukrainiangenitiveMonthname}[1]{%
930 \ifcase#1
931 \or
932 \protect\CYRS\protect\cyrii\protect\cyrch\protect\cyrn\protect\cyrya
933 \or
934 \protect\CYRL\protect\cyryu\protect\cyrt\protect\cyro\protect\cyrg
935 \protect\cyro
936 \or
937 \protect\CYRB\protect\cyre\protect\cyrr\protect\cyre\protect\cyrz
938 \protect\cyrn\protect\cyrya
939 \or
940 \protect\CYRK\protect\cyrv\protect\cyrii\protect\cyrt\protect\cyrn
941 \protect\cyrya
942 \or
943 \protect\CYRT\protect\cyrr\protect\cyra\protect\cyrv\protect\cyrn
944 \protect\cyrya
945 \or
946 \protect\CYRCH\protect\cyre\protect\cyrr\protect\cyrv\protect\cyrn
947 \protect\cyrya
948 \or
949 \protect\CYRL\protect\cyri\protect\cyrp\protect\cyrn\protect\cyrya
950 \or
951 \protect\CYRS\protect\cyre\protect\cyrr\protect\cyrp\protect\cyrn
952 \protect\cyrya
953 \or
954 \protect\CYRV\protect\cyre\protect\cyrr\protect\cyre\protect\cyrs
955 \protect\cyrn\protect\cyrya
956 \or
957 \protect\CYRZH\protect\cyro\protect\cyrv\protect\cyrt\protect\cyrn
958 \protect\cyrya
959 \or
960 \protect\CYRL\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
961 \protect\cyrp\protect\cyra\protect\cyrd\protect\cyra
962 \or
963 \protect\CYRG\protect\cyrr\protect\cyru\protect\cyrd\protect\cyrn
964 \protect\cyrya
965 \fi
966 }
967 % \end{macrocode}
968 %\end{macro}
969 %
970 %\changes{1.2}{2017/06/13}{Set as default genitive form of month name}
971 % Now we set \cs{DTMukrainiangenitiveMonthname} and \cs{DTMukrainiangenitivemonthname} as default setting.
972 % \begin{macrocode}
973 \newcommand*{\DTMukrainianmonthname}{\DTMukrainiangenitivemonthname}% default
974 \newcommand*{\DTMukrainianMonthname}{\DTMukrainiangenitiveMonthname}% default
975 % \end{macrocode}
976 %
977 %
978 %\begin{macro}{\DTMukrainianshortmonthname}
979 %
980 % ======= Abbreviated Ukrainian month names =======
981 %
982 %\changes{v1.1}{2017/06/11}{Add abbreviated month names}
983 % \begin{macrocode}
984 \newcommand*{\DTMukrainianshortmonthname}[1]{%
985 \ifcase#1
986 \or
987 \protect\cyrs\protect\cyrii\protect\cyrch.
988 \or
989 \protect\cyrl\protect\cyryu\protect\cyrt.
990 \or
991 \protect\cyrb\protect\cyre\protect\cyrr.
992 \or
993 \protect\cyrk\protect\cyrv\protect\cyrii\protect\cyrt.
994 \or
995 \protect\cyrt\protect\cyrr\protect\cyra\protect\cyrv.
996 \or
997 \protect\cyrch\protect\cyre\protect\cyrr\protect\cyrv.
998 \or
999 \protect\cyrl\protect\cyri\protect\cyrp.
1000 \or
1001 \protect\cyrs\protect\cyre\protect\cyrr\protect\cyrp.
1002 \or
1003 \protect\cyrv\protect\cyre\protect\cyrr.
1004 \or
1005 \protect\cyrzh\protect\cyro\protect\cyrv\protect\cyrt.
1006 \or
1007 \protect\cyrl\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
1008 \protect\cyrp.
1009 \or
1010 \protect\cyrg\protect\cyrr\protect\cyru\protect\cyrd.
1011 \fi
1012 }
1013 % \end{macrocode}
1014 %\end{macro}
1015 %
1016 %\begin{macro}{\DTMukrainianshortMonthname}
1017 %
1018 % ======= Abbreviated Capitalized Ukrainian month names =======
1019 %
1020 % \begin{macrocode}
1021 \newcommand*{\DTMukrainianshortMonthname}[1]{%
1022 \ifcase#1
1023 \or
1024 \protect\CYRS\protect\cyrii\protect\cyrch.
1025 \or
1026 \protect\CYRL\protect\cyryu\protect\cyrt.
1027 \or
1028 \protect\CYRB\protect\cyre\protect\cyrr.
1029 \or
1030 \protect\CYRK\protect\cyrv\protect\cyrii\protect\cyrt.
1031 \or
1032 \protect\CYRT\protect\cyrr\protect\cyra\protect\cyrv.
1033 \or
1034 \protect\CYRCH\protect\cyre\protect\cyrr\protect\cyrv.
1035 \or
1036 \protect\CYRL\protect\cyri\protect\cyrp.
1037 \or
1038 \protect\CYRS\protect\cyre\protect\cyrr\protect\cyrp.
1039 \or
1040 \protect\CYRV\protect\cyre\protect\cyrr.
1041 \or
1042 \protect\CYRZH\protect\cyro\protect\cyrv\protect\cyrt.
1043 \or
1044 \protect\CYRL\protect\cyri\protect\cyrs\protect\cyrt\protect\cyro
1045 \protect\cyrp.
1046 \or
1047 \protect\CYRG\protect\cyrr\protect\cyru\protect\cyrd.
1048 \fi
1049 }
1050 % \end{macrocode}
1051 %\end{macro}
1052 %
1053 %\begin{macro}{\DTMukrainianweekdayname}
1054 %
1055 % ======= Ukrainian day of week names =======
1056 %
1057 % \begin{macrocode}
1058 \newcommand*{\DTMukrainianweekdayname}[1]{%
1059 \ifcase#1
1060 \protect\cyrp\protect\cyro\protect\cyrn\protect\cyre\protect\cyrd\protect\cyrii\protect\cyrl\protect\cyro\protect\cyrk%
1061 \or
1062 \protect\cyrv\protect\cyrii\protect\cyrv\protect\cyrt\protect\cyro\protect\cyrr\protect\cyro\protect\cyrk%
1063 \or
1064 \protect\cyrs\protect\cyre\protect\cyrr\protect\cyre\protect\cyrd\protect\cyra%
1065 \or
1066 \protect\cyrch\protect\cyre\protect\cyrt\protect\cyrv\protect\cyre\protect\cyrr%
1067 \or
1068 \protect\cyrp'\protect\cyrya\protect\cyrt\protect\cyrn\protect\cyri\protect\cyrc\protect\cyrya%
1069 \or
1070 \protect\cyrs\protect\cyru\protect\cyrb\protect\cyro\protect\cyrt\protect\cyra%
1071 \or
1072 \protect\cyrn\protect\cyre\protect\cyrd\protect\cyrii\protect\cyrl\protect\cyrya%
1073 \fi
1074 }
1075 % \end{macrocode}
1076 %\end{macro}
1077 %
1078 %\begin{macro}{\DTMukrainianWeekdayname}
1079 %
1080 % ======= Ukrainian Capitalized day of week names =======
1081 %
1082 % \begin{macrocode}
1083 \newcommand*{\DTMukrainianWeekdayname}[1]{%
1084 \ifcase#1
1085 \protect\CYRP\protect\cyro\protect\cyrn\protect\cyre\protect\cyrd\protect\cyrii\protect\cyrl\protect\cyro\protect\cyrk%
1086 \or
1087 \protect\CYRV\protect\cyrii\protect\cyrv\protect\cyrt\protect\cyro\protect\cyrr\protect\cyro\protect\cyrk%
1088 \or
1089 \protect\CYRS\protect\cyre\protect\cyrr\protect\cyre\protect\cyrd\protect\cyra%
1090 \or
1091 \protect\CYRCH\protect\cyre\protect\cyrt\protect\cyrv\protect\cyre\protect\cyrr%
1092 \or
1093 \protect\CYRP'\protect\cyrya\protect\cyrt\protect\cyrn\protect\cyri\protect\cyrc\protect\cyrya%
1094 \or
1095 \protect\CYRS\protect\cyru\protect\cyrb\protect\cyro\protect\cyrt\protect\cyra%
1096 \or
1097 \protect\CYRN\protect\cyre\protect\cyrd\protect\cyrii\protect\cyrl\protect\cyrya%
1098 \fi
1099 }
1100 % \end{macrocode}
1101 %\end{macro}
1102 %
1103 %\begin{macro}{\DTMukrainianshortweekdayname}
1104 %
1105 % ======= Abbreviated Ukrainian day of week names =======
1106 %
1107 %\changes{v1.1}{2017/06/11}{Add abbreviated day of week names}
1108 % \begin{macrocode}
1109 \newcommand*{\DTMukrainianshortweekdayname}[1]{%
1110 \ifcase#1
1111 \protect\cyrp\protect\cyrn.%
1112 \or
1113 \protect\cyrv\protect\cyrt.%
1114 \or
1115 \protect\cyrs\protect\cyrr.%
1116 \or
1117 \protect\cyrch\protect\cyrt%
1118 \or
1119 \protect\cyrp\protect\cyrt.%
1120 \or
1121 \protect\cyrs\protect\cyrb.%
1122 \or
1123 \protect\cyrn\protect\cyrd.%
1124 \fi
1125 }
1126 % \end{macrocode}
1127 %\end{macro}
1128 %
1129 %\begin{macro}{\DTMukrainianshortWeekdayname}
1130 % ======= Abbreviated Ukrainian Capitalized day of week names =======
1131 % \begin{macrocode}
1132 \newcommand*{\DTMukrainianshortWeekdayname}[1]{%
1133 \ifcase#1
1134 \protect\CYRP\protect\cyrn.%
1135 \or
1136 \protect\CYRV\protect\cyrt.%
1137 \or
1138 \protect\CYRS\protect\cyrr.%
1139 \or
1140 \protect\CYRCH\protect\cyrt.%
1141 \or
1142 \protect\CYRP\protect\cyrt.%
1143 \or
1144 \protect\CYRS\protect\cyrb.%
1145 \or
1146 \protect\CYRN\protect\cyrd.%
1147 \fi
1148 }
1149 % \end{macrocode}
1150 %\end{macro}
1151 %
1152 %\iffalse
1153 % \begin{macrocode}
1154 %</datetime2-ukrainian-ascii.ldf>
1155 % \end{macrocode}
1156 %\fi
1157 %
1158 %\subsection{Main Ukrainian Module (\texttt{datetime2-ukrainian.ldf})}
1159 %\changes{1.0}{2015-04-01}{Initial release}
1160 %
1161 %\iffalse
1162 % \begin{macrocode}
1163 %<*datetime2-ukrainian.ldf>
1164 % \end{macrocode}
1165 %\fi
1166 %
1167 % Identify Module
1168 % \begin{macrocode}
1169 \ProvidesDateTimeModule{ukrainian}[2017/06/13 1.2]
1170 % \end{macrocode}
1171 % Need to find out if XeTeX or LuaTeX are being used.
1172 % \begin{macrocode}
1173 \RequirePackage{ifxetex,ifluatex}
1174 % \end{macrocode}
1175 % XeTeX and LuaTeX natively support UTF-8, so load
1176 % \texttt{ukrainian-utf8} if either of those engines are used
1177 % otherwise load \texttt{ukrainian-ascii}.
1178 % \begin{macrocode}
1179 \ifxetex
1180 \RequireDateTimeModule{ukrainian-utf8}
1181 \else
1182 \ifluatex
1183 \RequireDateTimeModule{ukrainian-utf8}
1184 \else
1185 \RequireDateTimeModule{ukrainian-ascii}
1186 \fi
1187 \fi
1188 % \end{macrocode}
1189 %
1190 % Define the \texttt{ukrainian} style.
1191 % The time style is the same as the "default" style
1192 % provided by \sty{datetime2}. This may need correcting. For
1193 % example, if a 12 hour style similar to the "englishampm" (from the
1194 % "english-base" module) is required.
1195 %
1196 % Allow the user a way of configuring the "ukrainian" and
1197 % "ukrainian-numeric" styles. This doesn't use the package wide
1198 % separators such as
1199 % \cs{dtm@datetimesep} in case other date formats are also required.
1200 %
1201 %\begin{macro}{\DTMukrainiandowdaysep}
1202 % The separator between the day of week name and the day of month
1203 % number for the text format.
1204 %\changes{1.2}{2017/06/13}{Add support for showdow}
1205 % \begin{macrocode}
1206 \newcommand*{\DTMukrainiandowdaysep}{%
1207 \DTMtexorpdfstring{\protect~}{\space}}
1208 % \end{macrocode}
1209 %\end{macro}
1210 %
1211 %\begin{macro}{\DTMukrainiandaymonthsep}
1212 % The separator between the day and month for the text format.
1213 % \begin{macrocode}
1214 \newcommand*{\DTMukrainiandaymonthsep}{%
1215 \DTMtexorpdfstring{\protect~}{\space}}
1216 % \end{macrocode}
1217 %\end{macro}
1218 %
1219 % \changes{1.2}{2017/06/13}{Added \cs{DTMukrainiannommonthyearsep}}
1220 %
1221 %\begin{macro}{\DTMukrainiannommonthyearsep}
1222 % The separator between the month and year for the text format.
1223 % \begin{macrocode}
1224 \newcommand*{\DTMukrainiannommonthyearsep}{%
1225 \DTMtexorpdfstring{\protect~}{\space}}
1226 % \end{macrocode}
1227 %\end{macro}
1228 %
1229 %\begin{macro}{\DTMukrainianmonthyearsep}
1230 % The separator between the month and year for the text format.
1231 % \changes{1.2}{2017/06/13}{Fixed: spacebar in tableofcontents was}
1232 % \begin{macrocode}
1233 \newcommand*{\DTMukrainianmonthyearsep}{%
1234 \DTMtexorpdfstring{\protect~}{\space}}
1235 % \end{macrocode}
1236 %\end{macro}
1237 %
1238 %\begin{macro}{\DTMukrainiandatetimesep}
1239 % The separator between the date and time blocks in the full format
1240 % (either text or numeric).
1241 % \begin{macrocode}
1242 \newcommand*{\DTMukrainiandatetimesep}{%
1243 \DTMtexorpdfstring{\protect~}{\space}}
1244 % \end{macrocode}
1245 %\end{macro}
1246 %
1247 %\begin{macro}{\DTMukrainiantimezonesep}
1248 % The separator between the time and zone blocks in the full format
1249 % (either text or numeric).
1250 % \begin{macrocode}
1251 \newcommand*{\DTMukrainiantimezonesep}{%
1252 \DTMtexorpdfstring{\protect~}{\space}}
1253 % \end{macrocode}
1254 %\end{macro}
1255 %
1256 %\begin{macro}{\DTMukrainiandatesep}
1257 % The separator for the numeric date format.
1258 % \begin{macrocode}
1259 \newcommand*{\DTMukrainiandatesep}{.}
1260 % \end{macrocode}
1261 %\end{macro}
1262 %
1263 %\begin{macro}{\DTMukrainiantimesep}
1264 % The separator for the numeric time format.
1265 % \begin{macrocode}
1266 \newcommand*{\DTMukrainiantimesep}{:}
1267 % \end{macrocode}
1268 %\end{macro}
1269 %
1270 % Provide keys that can be used in \cs{DTMlangsetup} to set these
1271 % separators.
1272 % \changes{1.2}{2017/06/13}{Added key dowdaysep}
1273 % \begin{macrocode}
1274 \DTMdefkey{ukrainian}{dowdaysep}{\renewcommand*{\DTMukrainiandowdaysep}{#1}}
1275 \DTMdefkey{ukrainian}{daymonthsep}{\renewcommand*{\DTMukrainiandaymonthsep}{#1}}
1276 \DTMdefkey{ukrainian}{monthyearsep}{\renewcommand*{\DTMukrainianmonthyearsep}{#1}}
1277 \DTMdefkey{ukrainian}{nommonthyearsep}{\renewcommand*{\DTMukrainiannommonthyearsep}{#1}}
1278 \DTMdefkey{ukrainian}{datetimesep}{\renewcommand*{\DTMukrainiandatetimesep}{#1}}
1279 \DTMdefkey{ukrainian}{timezonesep}{\renewcommand*{\DTMukrainiantimezonesep}{#1}}
1280 \DTMdefkey{ukrainian}{datesep}{\renewcommand*{\DTMukrainiandatesep}{#1}}
1281 \DTMdefkey{ukrainian}{timesep}{\renewcommand*{\DTMukrainiantimesep}{#1}}
1282 % \end{macrocode}
1283 % \changes{1.2}{2017/06/13}{Added genitive and nominative keys}
1284 % The block that defines the module options for using genitive or nominative case of month name:
1285 %
1286 % \begin{macrocode}
1287 \DTMdefchoicekey{ukrainian}{month}[\val\nr]{genitive,nominative}{%
1288 \ifcase\nr\relax
1289 \renewcommand*\DTMukrainianmonthname{\DTMukrainiangenitivemonthname}%
1290 \renewcommand*\DTMukrainianMonthname{\DTMukrainiangenitiveMonthname}%
1291 \or
1292 \renewcommand*\DTMukrainianmonthname{\DTMukrainiannominativemonthname}%
1293 \renewcommand*\DTMukrainianMonthname{\DTMukrainiannominativeMonthname}%
1294 \fi
1295 }
1296 % \end{macrocode}
1297 %
1298 % \changes{1.2}{2017/06/13}{Define a boolean key that can switch between full and abbreviated
1299 % formats for the month and day of week names in the text format}
1300 % Define a boolean key that can switch between full and abbreviated
1301 % formats for the month and day of week names in the text format.
1302 % \begin{macrocode}
1303 \DTMdefboolkey{ukrainian}{abbr}[true]{}
1304 % \end{macrocode}
1305 % The default is the full name.
1306 % \begin{macrocode}
1307 \DTMsetbool{ukrainian}{abbr}{false}
1308 % \end{macrocode}
1309 %
1310 %
1311 % Define a boolean key that determines if the time zone mappings
1312 % should be used.
1313 % \begin{macrocode}
1314 \DTMdefboolkey{ukrainian}{mapzone}[true]{}
1315 % \end{macrocode}
1316 % The default is to use mappings.
1317 % \begin{macrocode}
1318 \DTMsetbool{ukrainian}{mapzone}{true}
1319 % \end{macrocode}
1320 %
1321 % Define a boolean key that determines if the day of month should be
1322 % displayed.
1323 % \begin{macrocode}
1324 \DTMdefboolkey{ukrainian}{showdayofmonth}[true]{}
1325 % \end{macrocode}
1326 % The default is to show the day of month.
1327 % \begin{macrocode}
1328 \DTMsetbool{ukrainian}{showdayofmonth}{true}
1329 % \end{macrocode}
1330 %
1331 % Define a boolean key that determines if the year should be
1332 % displayed.
1333 % \begin{macrocode}
1334 \DTMdefboolkey{ukrainian}{showyear}[true]{}
1335 % \end{macrocode}
1336 % The default is to show the year.
1337 % \begin{macrocode}
1338 \DTMsetbool{ukrainian}{showyear}{true}
1339 % \end{macrocode}
1340 %
1341 % \begin{macrocode}
1342 \DTMnewstyle
1343 {ukrainian}% label
1344 {% date style
1345 \renewcommand*\DTMdisplaydate[4]{%
1346 \ifDTMshowdow
1347 \ifnum##4>-1
1348 \DTMifbool{ukrainian}{abbr}%
1349 {\DTMukrainianshortweekdayname{##4}}%
1350 {\DTMukrainianweekdayname{##4}}%
1351 \DTMukrainiandowdaysep
1352 \fi
1353 \fi
1354 \DTMifbool{ukrainian}{showdayofmonth}%
1355 {%
1356 \DTMukrainianordinal{##3}%
1357 \DTMukrainiandaymonthsep
1358 }%
1359 {}%
1360 \DTMifbool{ukrainian}{abbr}%
1361 {\DTMukrainianshortmonthname{##2}}%
1362 {\DTMukrainianmonthname{##2}}%
1363 \DTMifbool{ukrainian}{showyear}%
1364 {%
1365 \DTMukrainianmonthyearsep
1366 \DTMukrainianyear{##1}%
1367 }%
1368 {}%
1369 }%
1370 \renewcommand*\DTMDisplaydate[4]{%
1371 \ifDTMshowdow
1372 \ifnum##4>-1
1373 \DTMifbool{ukrainian}{abbr}%
1374 {\DTMukrainianshortWeekdayname{##4}}%
1375 {\DTMukrainianWeekdayname{##4}}%
1376 \DTMukrainiandowdaysep
1377 \DTMifbool{ukrainian}{showdayofmonth}%
1378 {%
1379 \DTMukrainianordinal{##3}%
1380 \DTMukrainiandaymonthsep
1381 }%
1382 {}%
1383 \DTMifbool{ukrainian}{abbr}%
1384 {\DTMukrainianshortmonthname{##2}}%
1385 {\DTMukrainianmonthname{##2}}%
1386 \DTMifbool{ukrainian}{showyear}%
1387 {%
1388 \DTMukrainianmonthyearsep
1389 \DTMukrainianyear{##1}%
1390 }%
1391 {}%
1392 \else
1393 \DTMifbool{ukrainian}{showdayofmonth}
1394 {%
1395 \DTMukrainianordinal{##3}%
1396 \DTMukrainiandaymonthsep
1397 \DTMifbool{ukrainian}{abbr}%
1398 {\DTMukrainianshortMonthname{##2}}%
1399 {\DTMukrainianMonthname{##2}}%
1400 }%
1401 {%
1402 \DTMifbool{ukrainian}{abbr}%
1403 {\DTMukrainianshortMonthname{##2}}%
1404 {\DTMukrainianMonthname{##2}}%
1405 }%
1406 \DTMifbool{ukrainian}{showyear}%
1407 {%
1408 \DTMukrainianmonthyearsep
1409 \DTMukrainianyear{##1}%
1410 }%
1411 {}%
1412 \fi
1413 \else
1414 \DTMifbool{ukrainian}{showdayofmonth}
1415 {%
1416 \DTMukrainianordinal{##3}%
1417 \DTMukrainiandaymonthsep
1418 \DTMifbool{ukrainian}{abbr}%
1419 {\DTMukrainianshortMonthname{##2}}%
1420 {\DTMukrainianMonthname{##2}}%
1421 }%
1422 {%
1423 \DTMifbool{ukrainian}{abbr}%
1424 {\DTMukrainianshortMonthname{##2}}%
1425 {\DTMukrainianMonthname{##2}}%
1426 }%
1427 \DTMifbool{ukrainian}{showyear}%
1428 {%
1429 \DTMukrainianmonthyearsep
1430 \DTMukrainianyear{##1}%
1431 }%
1432 {}%
1433 \fi
1434 }%
1435 }%
1436 {% time style (ignores seconds)
1437 \renewcommand*\DTMdisplaytime[3]{%
1438 \number##1
1439 \DTMukrainiantimesep\DTMtwodigits{##2}%
1440 }%
1441 }%
1442 {% zone style
1443 \DTMresetzones
1444 \DTMukrainianzonemaps
1445 \renewcommand*{\DTMdisplayzone}[2]{%
1446 \DTMifbool{ukrainian}{mapzone}%
1447 {\DTMusezonemapordefault{##1}{##2}}%
1448 {%
1449 \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
1450 \ifDTMshowzoneminutes\DTMukrainiantimesep\DTMtwodigits{##2}\fi
1451 }%
1452 }%
1453 }%
1454 {% full style
1455 \renewcommand*{\DTMdisplay}[9]{%
1456 \ifDTMshowdate
1457 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1458 \DTMukrainiandatetimesep
1459 \fi
1460 \DTMdisplaytime{##5}{##6}{##7}%
1461 \ifDTMshowzone
1462 \DTMukrainiantimezonesep
1463 \DTMdisplayzone{##8}{##9}%
1464 \fi
1465 }%
1466 \renewcommand*{\DTMDisplay}[9]{%
1467 \ifDTMshowdate
1468 \DTMDisplaydate{##1}{##2}{##3}{##4}%
1469 \DTMukrainiandatetimesep
1470 \fi
1471 \DTMdisplaytime{##5}{##6}{##7}%
1472 \ifDTMshowzone
1473 \DTMukrainiantimezonesep
1474 \DTMdisplayzone{##8}{##9}%
1475 \fi
1476 }%
1477 }%
1478 % \end{macrocode}
1479 %
1480 % Define numeric style.
1481 % \begin{macrocode}
1482 \DTMnewstyle
1483 {ukrainian-numeric}% label
1484 {% date style
1485 \renewcommand*\DTMdisplaydate[4]{%
1486 \DTMifbool{ukrainian}{showdayofmonth}%
1487 {%
1488 \number##3 % space intended
1489 \DTMukrainiandatesep
1490 }%
1491 {}%
1492 \number##2 % space intended
1493 \DTMifbool{ukrainian}{showyear}%
1494 {%
1495 \DTMukrainiandatesep
1496 \number##1 % space intended
1497 }%
1498 {}%
1499 }%
1500 \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}%
1501 }%
1502 {% time style
1503 \renewcommand*\DTMdisplaytime[3]{%
1504 \number##1
1505 \DTMukrainiantimesep\DTMtwodigits{##2}%
1506 \ifDTMshowseconds\DTMukrainiantimesep\DTMtwodigits{##3}\fi
1507 }%
1508 }%
1509 {% zone style
1510 \DTMresetzones
1511 \DTMukrainianzonemaps
1512 \renewcommand*{\DTMdisplayzone}[2]{%
1513 \DTMifbool{ukrainian}{mapzone}%
1514 {\DTMusezonemapordefault{##1}{##2}}%
1515 {%
1516 \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
1517 \ifDTMshowzoneminutes\DTMukrainiantimesep\DTMtwodigits{##2}\fi
1518 }%
1519 }%
1520 }%
1521 {% full style
1522 \renewcommand*{\DTMdisplay}[9]{%
1523 \ifDTMshowdate
1524 \DTMdisplaydate{##1}{##2}{##3}{##4}%
1525 \DTMukrainiandatetimesep
1526 \fi
1527 \DTMdisplaytime{##5}{##6}{##7}%
1528 \ifDTMshowzone
1529 \DTMukrainiantimezonesep
1530 \DTMdisplayzone{##8}{##9}%
1531 \fi
1532 }%
1533 \renewcommand*{\DTMDisplay}{\DTMdisplay}%
1534 }
1535 % \end{macrocode}
1536 %
1537 %\begin{macro}{\DTMukrainianzonemaps}
1538 % The time zone mappings are set through this command, which can be
1539 % redefined if extra mappings are required or mappings need to be
1540 % removed. These may need translating (in which case the definitions
1541 % might need to be moved to the \texttt{utf8} and \texttt{ascii} ldf
1542 % files).
1543 % \begin{macrocode}
1544 \newcommand*{\DTMukrainianzonemaps}{%
1545 \DTMdefzonemap{02}{00}{EET}% Східноєвропейський час
1546 \DTMdefzonemap{03}{00}{EEST}% Східноєвропейський літній час
1547 }
1548 % \end{macrocode}
1549 %\end{macro}
1550
1551 % Switch style according to the \opt{useregional} setting.
1552 % \begin{macrocode}
1553 \DTMifcaseregional
1554 {}% do nothing
1555 {\DTMsetstyle{ukrainian}}%
1556 {\DTMsetstyle{ukrainian-numeric}}%
1557 % \end{macrocode}
1558 %
1559 % Redefine \cs{dateukrainian} (or \cs{date}\meta{dialect}) to prevent
1560 % \sty{babel} from resetting \cs{today}. (For this to work,
1561 % \sty{babel} must already have been loaded if it's required.)
1562 % \begin{macrocode}
1563 \ifcsundef{date\CurrentTrackedDialect}
1564 {%
1565 \ifundef\dateukrainian
1566 {% do nothing
1567 }%
1568 {%
1569 \def\dateukrainian{%
1570 \DTMifcaseregional
1571 {}% do nothing
1572 {\DTMsetstyle{ukrainian}}%
1573 {\DTMsetstyle{ukrainian-numeric}}%
1574 }%
1575 }%
1576 }%
1577 {%
1578 \csdef{date\CurrentTrackedDialect}{%
1579 \DTMifcaseregional
1580 {}% do nothing
1581 {\DTMsetstyle{ukrainian}}%
1582 {\DTMsetstyle{ukrainian-numeric}}%
1583 }%
1584 }%
1585 % \end{macrocode}
1586 %\iffalse
1587 % \begin{macrocode}
1588 %</datetime2-ukrainian.ldf>
1589 % \end{macrocode}
1590 %\fi
1591 %
1592 % \CheckSum{1642}
1593 %\Finale