aboutsummaryrefslogtreecommitdiff
path: root/vcalendar/datetime.scm
blob: 9f47f5c3fd479b56faf68fbc8fa8d688cc27c993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(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
  
  (date->time-utc
   (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")))))