I'm writing a tool to track time spent on projects in Emacs (kind of like timeclock with reporting and more functions). Short of ripping org-read-date
out of org-mode, however, I'm unable to find a good way of allowing the user to enter a dates for reporting without requiring that they enter it in the format "2011-04-22T00:00:00", which is not so human-friendly.
Is there an obvious way I'm missing? If not, can you suggest a not-too-开发者_运维知识库complex way of writing one?
Are you sure you can't use org-read-date
? It also understands human-friendly input formats like "10 Jul 8pm". And org is bundled in recent Emacs.
If you're willing to tolerate a dependency on the calendar package, there's also the function calendar-read-date
. It's not as fancy as org-mode's prompts, but the calendar package may be a more palatable prerequisite.
精彩评论