Skip to content
Snippets Groups Projects
Unverified Commit aa9099e4 authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

Move date->rfc822-str to utils.scm.

* src/cuirass/rss.scm (date->rfc822-str): Move it to ...
* src/cuirass/utils.scm: ... here.
parent 731bc834
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
(define-module (cuirass rss)
#:use-module (cuirass database)
#:use-module (cuirass utils)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (sxml simple)
......@@ -126,9 +127,6 @@ list ATTRS and the child nodes in BODY."
(lambda (port)
(sxml->html sxml port))))
(define (date->rfc822-str date)
(date->string date "~a, ~d ~b ~Y ~T ~z"))
(define* (build->rss-item build)
"Convert BUILD into an RSS <item> node."
(let* ((id (assq-ref build #:id))
......
......@@ -30,6 +30,7 @@
#:use-module (rnrs bytevectors)
#:use-module (system foreign)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:use-module (json)
#:use-module (fibers)
#:use-module (fibers channels)
......@@ -52,7 +53,9 @@
%non-blocking
non-blocking
essential-task
bytevector-range))
bytevector-range
date->rfc822-str))
(define (alist? obj)
"Return #t if OBJ is an alist."
......@@ -317,3 +320,6 @@ die silently while the rest of the program keeps going."
(range (pointer->bytevector pointer count)))
(hashq-set! %weak-references range bv)
range))))
(define (date->rfc822-str date)
(date->string date "~a, ~d ~b ~Y ~T ~z"))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment