Skip to content

Commit

Permalink
Use find-seconds; fixes greghendershott#240
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee authored and Greg Hendershott committed Jan 4, 2019
1 parent 1d6d42b commit 08fa3db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frog/private/bodies-page.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(require markdown
net/uri-codec
racket/dict
racket/date
(only-in racket/list add-between)
racket/match
racket/port
Expand Down Expand Up @@ -169,9 +170,10 @@
(define (date->date-struct YYYY-MM-DD-string)
(match YYYY-MM-DD-string
[(pregexp "(\\d{4})-(\\d{2})-(\\d{2})" (list _ y m d))
(date 0 0 0
(string->number d) (string->number m) (string->number y)
0 0 #f 0)]))
(seconds->date (find-seconds 0 0 0
(string->number d)
(string->number m)
(string->number y)))]))

(define (date+tags->xexpr date tags)
`(p ([class "date-and-tags"])
Expand Down

0 comments on commit 08fa3db

Please sign in to comment.