Skip to content

Commit

Permalink
Fix infer-moment contract, bump version (fixes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
otherjoel committed Apr 8, 2022
1 parent 7e1ca56 commit d45edee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
7 changes: 5 additions & 2 deletions splitflap-doc/constructs.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,13 @@ ommitted, @racketvalfont{00:00:00} (the very start of the date) is assumed.
(infer-moment "2012-08-31 13:34")
(infer-moment "2015-10-02 01:03:15")

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

(infer-moment "2012-09-14 12")]
(infer-moment "2012-09-14 12")
(infer-moment)]

@history[#:changed "1.2" "Added no-argument form for current moment"]

}

Expand Down
13 changes: 8 additions & 5 deletions splitflap-doc/mod-splitflap.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ Returns a @racketresultfont{#<feed>} struct. You can inspect its contents with @
If any of the @tech{tag URIs} of the @racket[_entries] are @racket[tag=?] with each other or with the
feed @racket[_id], an exception is raised identifying the first duplicate encountered.

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

}

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

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

The output of complete feeds can be further affected by other parameters (view their documentation
for more information):

@itemlist[#:style 'compact

Expand Down
2 changes: 1 addition & 1 deletion splitflap-lib/constructs.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

; Moments
(contract-out
[infer-moment (-> string? moment?)]
[infer-moment (->* () (string?) moment?)]
[moment->string (-> moment? (or/c 'rss 'atom) string?)])

; Enclosures and MIME types
Expand Down
2 changes: 1 addition & 1 deletion splitflap-lib/info.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#lang info

(define collection "splitflap")
(define version "1.1")
(define version "1.2")

(define deps '("gregor-lib"
"rackunit-lib"
Expand Down

0 comments on commit d45edee

Please sign in to comment.