Remove the leading zero from date

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite
1












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?










share|improve this question

























    up vote
    4
    down vote

    favorite
    1












    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?










    share|improve this question























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      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?










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 43 mins ago









      dedded

      531211




      531211




















          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





          share|improve this answer
















          • 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







          • 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 ##1 could be better.
            – egreg
            5 mins ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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






























          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





          share|improve this answer
















          • 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







          • 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 ##1 could be better.
            – egreg
            5 mins ago














          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





          share|improve this answer
















          • 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







          • 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 ##1 could be better.
            – egreg
            5 mins ago












          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





          share|improve this answer












          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






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 25 mins ago









          David Carlisle

          470k3810991827




          470k3810991827







          • 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







          • 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 ##1 could be better.
            – egreg
            5 mins ago












          • 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







          • 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 ##1 could 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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Comments

          Popular posts from this blog

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Confectionery