Skip to content

format.POSIXlt drops characters following percent sign (PR#8976)

1 message · Brian Ripley

#
On Tue, 13 Jun 2006, jhallman at frb.gov wrote:

            
There is no such command as Internal: you seem to be mean .Internal but 
please use user-level functions.
What the help page actually says is (no typo):

      The details of the formats are system-specific, but the following
      are defined by the ISO C / POSIX standard for 'strftime' and are
      likely to be widely available.  Any character in the format string
      other than the '%' escape sequences is interpreted literally (and
      '%%' gives '%').

The help page carefully does not say what *any* escape sequence does, nor 
what the escape sequences are: it merely indicates common behaviour.
It seems you did not look up what the standards say, which is

   If a conversion specification does not correspond to any of the above,
   the behavior is undefined.

And `undefined' is itself defined in the standards.  The Windows 
documentation does not say what it does (nor does the glibc 
documentation), not even that it is system-specific.  In fact the MSDN 
docs for strftime say

   Characters that do not begin with % are copied unchanged to strDest.

(Make of that what you can.)

Where standards are referred to, please do consult them.  The kind people 
who develop R have even provided links to them at
http://developer.r-project.org/Portability.html