Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGZILLA #17208] strptime, "%OS" and "." #6383

Open
MichaelChirico opened this issue May 19, 2020 · 0 comments
Open

[BUGZILLA #17208] strptime, "%OS" and "." #6383

MichaelChirico opened this issue May 19, 2020 · 0 comments

Comments

@MichaelChirico
Copy link
Owner

Recall that the "%OS" conversion accepts fractional seconds:

strptime("17_35_14.01234.mp3","%H_%M_%OS.mp3")$sec

[1] 14.01234

Unfortunately for my application it seems to be "greedy", in that it tries to parse a decimal point which might belong to the rest of the format:

strptime("17_35_14.mp3","%H_%M_%OS.mp3")

[1] NA

If I use "_" instead of ".", then it works:

strptime("17_35_14_mp3","%H_%M_%OS_mp3")

[1] "2017-01-10 17:35:14 PST"

It would be nice if the code for R's "strptime" could avoid parsing the "." into the "%OS" specifier if it is not followed by a number.


METADATA

  • Bug author - Frederick Eaton
  • Creation time - 2017-01-12 21:44:05 UTC
  • Bugzilla link
  • Status - UNCONFIRMED
  • Alias - None
  • Component - Language
  • Version - R 3.3.*
  • Hardware - Other Linux
  • Importance - P5 enhancement
  • Assignee - R-core
  • URL -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant