Skip to content

Commit d45edee

Browse files
committed
Fix infer-moment contract, bump version (fixes #9)
1 parent 7e1ca56 commit d45edee

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

splitflap-doc/constructs.scrbl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,13 @@ ommitted, @racketvalfont{00:00:00} (the very start of the date) is assumed.
199199
(infer-moment "2012-08-31 13:34")
200200
(infer-moment "2015-10-02 01:03:15")
201201

202-
(parameterize ([current-timezone 0])
202+
(parameterize ([current-timezone -14400])
203203
(infer-moment "2015-10-02 01:03:15"))
204204

205-
(infer-moment "2012-09-14 12")]
205+
(infer-moment "2012-09-14 12")
206+
(infer-moment)]
207+
208+
@history[#:changed "1.2" "Added no-argument form for current moment"]
206209

207210
}
208211

splitflap-doc/mod-splitflap.scrbl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ Returns a @racketresultfont{#<feed>} struct. You can inspect its contents with @
7979
If any of the @tech{tag URIs} of the @racket[_entries] are @racket[tag=?] with each other or with the
8080
feed @racket[_id], an exception is raised identifying the first duplicate encountered.
8181

82-
The @racket[_entries] will be sorted in reverse chronological order by their “updated” timestamps.
83-
The most recent timestamp is also used as the feed’s own last-updated timestamp.
84-
8582
}
8683

8784
@section{Producing feed XML}
@@ -105,8 +102,14 @@ The @racket[_feed-url] argument must be supplied as a valid URL string when @rac
105102
It is not a required argument when @racket[_data] is any other type, and in those cases it will be
106103
ignored if supplied.
107104

108-
For complete feeds (e.g., when @racket[_data] is a @racket[feed] or @racket[podcast]) the output can
109-
be further affected by other parameters. View their documentation for more information.
105+
For complete feeds (e.g., when @racket[_data] is a @racket[feed] or @racket[podcast]), the
106+
entries/episodes will be sorted in reverse chronological order by their “updated” timestamps, and
107+
the most recent such timestamp is used as the value for feed-level “last updated” and/or “published”
108+
elements. If the feed contains no entries or episodes, these feed-level timestamps will use
109+
@racket[now/moment].
110+
111+
The output of complete feeds can be further affected by other parameters (view their documentation
112+
for more information):
110113

111114
@itemlist[#:style 'compact
112115

splitflap-lib/constructs.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
; Moments
3636
(contract-out
37-
[infer-moment (-> string? moment?)]
37+
[infer-moment (->* () (string?) moment?)]
3838
[moment->string (-> moment? (or/c 'rss 'atom) string?)])
3939

4040
; Enclosures and MIME types

splitflap-lib/info.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#lang info
22

33
(define collection "splitflap")
4-
(define version "1.1")
4+
(define version "1.2")
55

66
(define deps '("gregor-lib"
77
"rackunit-lib"

0 commit comments

Comments
 (0)