Boost C++ Libraries: Ticket #8528: time_input_facet doesn't support %e https://svn.boost.org/trac10/ticket/8528 <p> time_input_facet doesn't support the %e substitution for days without leading zero. </p> <p> This means that the following code for parsing RFC 2822 dates fails: </p> <pre class="wiki">auto time_facet = new boost::posix_time::time_input_facet; time_facet-&gt;format("%a, %e %b %Y %H:%M:%S"); </pre><p> Test strings (note that time zone portion is not parsed): </p> <pre class="wiki">Tue, 15 Jan 2013 06:50:21 -0700 Wed, 9 Jan 2013 12:33:57 -0700 </pre><p> Also note that the second date makes %a, %d %b %Y a non-starter. </p> <p> The attached patch fixes the problem for me. The patch is against 1.51, but I check the 1.53 code and upon a brief code inspection it didn't appear to have changed significantly. </p> <p> Note that I made no attempt to verify how it behaves on badly constructed input; I simply cloned the %d code and changed it to call parse_var_day_of_month() instead of parse_day_of_month(). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8528 Trac 1.4.3 galbraithjoseph@… Tue, 30 Apr 2013 15:21:33 GMT attachment set https://svn.boost.org/trac10/ticket/8528 https://svn.boost.org/trac10/ticket/8528 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">time_facet_e.diff</span> </li> </ul> <p> patch adding support for %e to time_input_facet </p> Ticket anonymous Thu, 24 Sep 2015 21:47:08 GMT <link>https://svn.boost.org/trac10/ticket/8528#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8528#comment:1</guid> <description> <p> There are a few of us out there who would benefit greatly from being able to parse date, hour, etc as single digits without the leading zeros. Some customers just give us data in that format. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Fri, 22 Dec 2017 15:08:07 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8528#comment:2 https://svn.boost.org/trac10/ticket/8528#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/13194" title="#13194: Bugs: Time input facet is not able to parse '%e' day (closed: fixed)">#13194</a>, for which a pull request was submitted. Closing as a duplicate. </p> Ticket