1

According to https://strftime.org, the format code %-m (as well as a bunch of others) is marked as "Platform dependent". The specifier %-m means "month as a decimal". This seems like a very basic function, so how/why does it vary across operating systems? If I parse "1", what platform could run into issues with this? Finally, what platforms are we talking about? Does this vary by OS?

Thank you!

a1426
  • 256
  • 2
  • 8
  • AFAIK they only work in linux, not windows – Chris Jul 23 '20 at 19:43
  • The answer is just a bit further down on the same page. Ctrl+f for the section titled "*Platform specific directives*" – wim Jul 23 '20 at 19:46
  • Oh, didn't see that. Thank you both! – a1426 Jul 23 '20 at 19:47
  • [related, SO](https://stackoverflow.com/questions/28894172/why-does-d-or-e-remove-the-leading-space-or-zero), and also pointed out in [the docs](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior) - *Python calls the platform C library’s strftime() function, and platform variations are common* . – FObersteiner Jul 24 '20 at 07:05

0 Answers0