|
15 | 15 | \newcommand\githeadminute{0} |
16 | 16 | \newcommand\githeadsecond{0} |
17 | 17 | \newcommand\githeadtzsign{+} |
18 | | -\newcommand\githeadtzhour{00} |
19 | | -\newcommand\githeadtzminute{00} |
| 18 | +\newcommand\githeadtzhour{0} |
| 19 | +\newcommand\githeadtzminute{0} |
20 | 20 |
|
21 | 21 | % semi-private settings |
22 | 22 | \newcommand\GI@max@depth{8} |
|
95 | 95 | \GI@get@head@infos |
96 | 96 | \GI@get@gen@datetime{head}% |
97 | 97 | \edef\@tempa{\endgroup |
98 | | -\GI@set@export\githeadauthor{\githeadauthor}% |
99 | | -\GI@set@export\githeadmail{\githeadmail}% |
100 | 98 | \GI@set@export\githeadcommit{\githeadcommit}% |
101 | 99 | \GI@set@export\githeadbranch{\githeadbranch}% |
102 | | -\GI@set@export\githeadyear{\githeadyear}% |
103 | | -\GI@set@export\githeadmonth{\githeadmonth}% |
104 | | -\GI@set@export\githeadday{\githeadday}% |
105 | | -\GI@set@export\githeadhour{\githeadhour}% |
106 | | -\GI@set@export\githeadminute{\githeadminute}% |
107 | | -\GI@set@export\githeadsecond{\githeadsecond}% |
108 | | -\GI@set@export\githeadtzsign{\githeadtzsign}% |
109 | | -\GI@set@export\githeadtzhour{\githeadtzhour}% |
110 | | -\GI@set@export\githeadtzminute{\githeadtzminute}}% |
| 100 | +\GI@set@export\githeadauthor{\githeadauthor}% |
| 101 | +\GI@set@export\githeadmail{\githeadmail}% |
| 102 | +\GI@set@export\githeaddatetime{\githeaddatetime}}% |
111 | 103 | \@tempa} |
112 | 104 |
|
113 | 105 | % finding the path to head |
|
240 | 232 | \GI@extract@units\GI@hour{24}% |
241 | 233 | \GI@extract@year |
242 | 234 | \GI@extract@month@day |
| 235 | + \edef\GI@datetime{% |
| 236 | +\GI@year-\GI@two@d{\the\GI@month}-\GI@two@d\GI@day |
| 237 | +T\GI@two@d\GI@hour:\GI@two@d\GI@min:\GI@two@d\GI@sec |
| 238 | +\GI@tzsign\GI@two@d\GI@tzhour\GI@two@d\GI@tzmin}% |
243 | 239 | \edef\@tempa{\endgroup |
244 | | -\GI@set@export@name{git#1year}{\GI@year}% |
245 | | -\GI@set@export@name{git#1month}{\the\GI@month}% |
246 | | -\GI@set@export@name{git#1day}{\GI@day}% |
247 | | -\GI@set@export@name{git#1hour}{\GI@hour}% |
248 | | -\GI@set@export@name{git#1minute}{\GI@min}% |
249 | | -\GI@set@export@name{git#1second}{\GI@sec}% |
250 | | -\GI@set@export@name{git#1tzsign}{\GI@tzsign}% |
251 | | -\GI@set@export@name{git#1tzhour}{\GI@tzhour}% |
252 | | -\GI@set@export@name{git#1tzminute}{\GI@tzmin}}% |
| 240 | +\GI@set@export@name{git#1datetime}{\GI@datetime}} |
253 | 241 | \@tempa} |
254 | 242 |
|
255 | 243 | \newcommand\GI@parse@timezone[5]{% |
256 | 244 | \def\GI@tzsign{#1}% |
257 | 245 | \def\GI@tzhour{#2#3}% |
258 | 246 | \def\GI@tzmin{#4#5}} |
259 | 247 |
|
260 | | -% time display |
261 | | - |
262 | | -\newcommand\GI@pad[1]{% |
263 | | - \ifnum#1<10 0#1\else#1\fi} |
264 | | - |
265 | | -\newcommand\githeadisodate{% |
266 | | - \git@gen@isodate{head}} |
267 | | - |
268 | | -\newcommand\git@gen@isodate[1]{% |
269 | | - \csname git#1year\endcsname-% |
270 | | - \GI@pad{\csname git#1month\endcsname}-% |
271 | | - \GI@pad{\csname git#1day\endcsname}T% |
272 | | - \GI@pad{\csname git#1hour\endcsname}:% |
273 | | - \GI@pad{\csname git#1minute\endcsname}:% |
274 | | - \GI@pad{\csname git#1second\endcsname}% |
275 | | - \csname git#1tzsign\endcsname |
276 | | - \csname git#1tzhour\endcsname:% |
277 | | - \csname git#1tzminute\endcsname} |
| 248 | +\newcommand\GI@two@d[1]{% |
| 249 | + \ifnum#1<10 0\number#1\else \number#1\fi} |
278 | 250 |
|
279 | 251 | % main |
280 | 252 |
|
|
0 commit comments