The format-time-string
function takes a time argument like '(21761 64499 350937 0)
and a format string like "%y-%m-%d %a %H:%M"
and returns something like "15-03-12 Thu 16:49"
.
What is the inverse function, which takes "15-03-12 Thu 16:49"
and "%y-%m-%d %a %H:%M"
, and returns '(21761 64499 350937 0)
?
I am trying to parse times out of a website so as to convert them into org-mode timestamps, but I'm having trouble finding the right function in the emacs documentation.
Edit I'm promoting this from my comment to erikstoke's answer. parse-time-string
and org-parse-time-string
are insufficient because while they parse many standard time strings, they do not allow for specified formats. Both functions are rather incomprehensive. In particular, they lack ISO8601 support.