diff options
author | Arun Isaac | 2023-10-13 19:53:47 +0100 |
---|---|---|
committer | Arun Isaac | 2023-10-13 19:55:41 +0100 |
commit | 5550bdf055b8ec9619f5ebfe6c47e13fb4605590 (patch) | |
tree | a774478adadc82df5396bcca4659185f5815fcb1 | |
parent | 35e35f233b5dcf7669361df5ebb8e33f799ae52d (diff) | |
download | rent-in-london-5550bdf055b8ec9619f5ebfe6c47e13fb4605590.tar.gz rent-in-london-5550bdf055b8ec9619f5ebfe6c47e13fb4605590.tar.lz rent-in-london-5550bdf055b8ec9619f5ebfe6c47e13fb4605590.zip |
Show hours live in more human-readable units.
* rent.scm (list-house): Show hours live in hours or days as
appropriate.
-rw-r--r-- | rent.scm | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -397,14 +397,19 @@ and not distance as the crow flies." (define (list-house house) "Display details of @var{house} on the current output port." (format (current-output-port) - "~a (posted ~a hours ago) + "~a (posted ~a ago) ~a/~a £~a pcm Available from ~a Cycling distance: ~,1f km " (house-title house) - (house-hours-live house) + (if (< (house-hours-live house) 24) + (format #f "~a hours" + (house-hours-live house)) + (format #f "~a days" + (round-quotient (house-hours-live house) + 24))) %openrent-base-url (house-property-id house) (house-rent house) |