* Modify org-ts-regexpr0 to satisfy Karl Voit :-) This is an attempt to allow timestamps without a day-of-week. Modifying complicated regexps is no fun: I had to resort to re-builder to figure out what was going on. The problem was that the first " *" which is supposed to eat all the spaces between the "2012-03-05" part and the "Mon" part, would, in the absence of the "Mon" part, eat the space before the time spec "08:00". But the regexp for the time part explicitly requires that space (see the second sp in the explanatory line below). So I tried making the DOW part optional by appending a ?, but that didn't do the trick. re-builder showed the space problem: there was no space left to match if DOW is absent, so I changed the literal space " " to 0 or more spaces " *" and that did the trick (with some caveats noted below). In the code block below, tslist is a list of test cases. The code block sets org-ts-regexp0 first to its original value, then to the changed value (the first one is there just for comparison between the two). I've marked the changes (of which, the second is the significant one). We map the function org-parse-time-string over the test cases and get a list of results. The results look reasonable, but the new regexp allows funny-looking input like the second and fourth test case. One additional caveat is that org-odt uses org-ts-regexp0, so changing it without checking org-odt's use is fraught with peril, but that's what I've done: I have no idea whether it causes problems in org-odt. #+BEGIN_SRC elisp ; year_______ - month______ - day________ sp DOW____________ sp hour_________ : minutes____ (setq org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)") ; changed v v (setq org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)?\\( *\\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)") (setq tslist '( "<2012-03-05 Mon 08:00>" "<2012-03-05 Mon08:00>" "<2012-03-05 Mon 8:00>" "<2012-03-05 Mon8:00>" "<2012-03-05 Mon 8:00>" "<2012-03-05 Mon 8:00>" "<2012-03-05 Mon >" "<2012-03-05 Mon>" "<2012-03-05 08:00>" "<2012-03-05 8:00>" "<2012-03-05 8:00>" "<2012-03-05>")) (pp (mapcar 'org-parse-time-string tslist)) #+END_SRC #+RESULTS: #+begin_example ((0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 0 5 3 2012 nil nil nil) (0 0 0 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 8 5 3 2012 nil nil nil) (0 0 0 5 3 2012 nil nil nil)) #+end_example