Remove the leading zero from date

Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I like to print dates formatted in this way: 6 October 2018. Usually, I just type the date by hand. But I tried to set things up so that today would format dates the way I like. I must have only tested it when the day number was two digits. I have this:
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
Unfortunately, this prints 06 October 2018, with a leading zero to force a two-digit day. How do I get 6 October 2018, without the leading zero?
datetime2
add a comment |Â
up vote
4
down vote
favorite
I like to print dates formatted in this way: 6 October 2018. Usually, I just type the date by hand. But I tried to set things up so that today would format dates the way I like. I must have only tested it when the day number was two digits. I have this:
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
Unfortunately, this prints 06 October 2018, with a leading zero to force a two-digit day. How do I get 6 October 2018, without the leading zero?
datetime2
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I like to print dates formatted in this way: 6 October 2018. Usually, I just type the date by hand. But I tried to set things up so that today would format dates the way I like. I must have only tested it when the day number was two digits. I have this:
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
Unfortunately, this prints 06 October 2018, with a leading zero to force a two-digit day. How do I get 6 October 2018, without the leading zero?
datetime2
I like to print dates formatted in this way: 6 October 2018. Usually, I just type the date by hand. But I tried to set things up so that today would format dates the way I like. I must have only tested it when the day number was two digits. I have this:
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
Unfortunately, this prints 06 October 2018, with a leading zero to force a two-digit day. How do I get 6 October 2018, without the leading zero?
datetime2
datetime2
asked 43 mins ago
dedded
531211
531211
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
The package may have a specific command, but you can use the TeX number command
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]number##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
1
That's actually the method recommended by the manual ofdatetime2, page 95. No caveat about the problem of following space, unfortunately.
â egreg
20 mins ago
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1could be better.
â egreg
5 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
The package may have a specific command, but you can use the TeX number command
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]number##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
1
That's actually the method recommended by the manual ofdatetime2, page 95. No caveat about the problem of following space, unfortunately.
â egreg
20 mins ago
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1could be better.
â egreg
5 mins ago
add a comment |Â
up vote
4
down vote
The package may have a specific command, but you can use the TeX number command
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]number##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
1
That's actually the method recommended by the manual ofdatetime2, page 95. No caveat about the problem of following space, unfortunately.
â egreg
20 mins ago
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1could be better.
â egreg
5 mins ago
add a comment |Â
up vote
4
down vote
up vote
4
down vote
The package may have a specific command, but you can use the TeX number command
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]number##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
The package may have a specific command, but you can use the TeX number command
documentclassarticle
usepackage[english]datetime2
DTMnewdatestylestrunkdate%
renewcommand*DTMdisplaydate[4]number##3 DTMenglishmonthname##2 ##1
renewcommand*DTMDisplaydateDTMdisplaydate
AtBeginDocument%
DTMsetdatestylestrunkdate% after babel loaded, or babel stomps on this
begindocument
Today is today.
enddocument
answered 25 mins ago
David Carlisle
470k3810991827
470k3810991827
1
That's actually the method recommended by the manual ofdatetime2, page 95. No caveat about the problem of following space, unfortunately.
â egreg
20 mins ago
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1could be better.
â egreg
5 mins ago
add a comment |Â
1
That's actually the method recommended by the manual ofdatetime2, page 95. No caveat about the problem of following space, unfortunately.
â egreg
20 mins ago
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1could be better.
â egreg
5 mins ago
1
1
That's actually the method recommended by the manual of
datetime2, page 95. No caveat about the problem of following space, unfortunately.â egreg
20 mins ago
That's actually the method recommended by the manual of
datetime2, page 95. No caveat about the problem of following space, unfortunately.â egreg
20 mins ago
1
1
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
@egreg didn't occur to me to look in a manual!
â David Carlisle
13 mins ago
In order to preserve full expandability to character tokens,
numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1 could be better.â egreg
5 mins ago
In order to preserve full expandability to character tokens,
numbernumexpr##3relaxspaceDTMenglishmonthname##2 ##1 could be better.â egreg
5 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454165%2fremove-the-leading-zero-from-date%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
