diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-03-02 23:13:41 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-03-02 23:13:41 +0100 |
commit | 9a6586a0a33e97cdee8cb417556f033b9c6b93a0 (patch) | |
tree | ae40aca66ff9a12c785ff122f3c92168f89ddd66 /vcalendar/datetime.scm | |
parent | Add print-vcomponent procedure. (diff) | |
download | calp-9a6586a0a33e97cdee8cb417556f033b9c6b93a0.tar.gz calp-9a6586a0a33e97cdee8cb417556f033b9c6b93a0.tar.xz |
Move datetime stuff to better suited files.
Diffstat (limited to '')
-rw-r--r-- | vcalendar/datetime.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcalendar/datetime.scm b/vcalendar/datetime.scm new file mode 100644 index 00000000..af8382c8 --- /dev/null +++ b/vcalendar/datetime.scm @@ -0,0 +1,16 @@ +(define-module (vcalendar datetime) + #:use-module (srfi srfi-19) + #:use-module (srfi srfi-19 util) + + #:export (parse-datetime) + ) + +(define (parse-datetime dtime) + "Parse the given date[time] string into a date object." + (localize-date + (string->date + dtime + (case (string-length dtime) + ((8) "~Y~m~d") + ((15) "~Y~m~dT~H~M~S") + ((16) "~Y~m~dT~H~M~S~z"))))) |