File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ val reader = tryTo("initialize the feed reader") { XmlReader(feedUrl) }
2424val file = File (" last-rss-update.txt" )
2525val feed = SyndFeedInput ().build(reader)
2626val ours = file.readText().trimEnd().parse()
27+ val ourDate = ours.toLocalDate().toString()
2728val theirs = feed.publishedDate.toString().parse()
2829val theirDate = theirs.toLocalDate().toString()
29- val theirTime = theirs.toLocalTime().format(ISO_LOCAL_TIME )
30+ val theirTime = theirs.toLocalTime().format(DateTimeFormatter .ofPattern( " hha " ) )
3031val areTheSame = ours == theirs
3132val freshness = if (areTheSame) " latest" else " stale"
32- val dateTag = theirDate + if (areTheSame ) " T $theirTime " else " "
33+ val dateTag = theirDate + if (ourDate == theirDate ) " @ $theirTime " else " "
3334reader.close()
3435
3536// To log for debug
You can’t perform that action at this time.
0 commit comments