From: Christian Heller Date: Mon, 2 Jan 2017 23:32:58 +0000 (+0100) Subject: Shorten human-readable time display in article view. X-Git-Url: https://plomlompom.com/repos/error?a=commitdiff_plain;h=9d8c6181a6880b2c6eaa97d16e68d2fa6755cf9e;p=redo-blog Shorten human-readable time display in article view. --- diff --git a/README.md b/README.md index 084b244..12d7372 100644 --- a/README.md +++ b/README.md @@ -107,5 +107,4 @@ break things. The article title is derived in .md files from a first line prefixed with `%`, while all other headings are treated as sub-headings. In .rst files, the title is derived from a heading that must be at the top of the document, and be of an -adornment style (such as underlining with `=`) that must be used only once in -it. +adornment style (such as underlining with `=`) used only once in it. diff --git a/processor/default.html.do b/processor/default.html.do index c44d00b..9c8c301 100644 --- a/processor/default.html.do +++ b/processor/default.html.do @@ -21,7 +21,7 @@ title_plaintext=$(escape_html "$title_plaintext" | prep_sed) body=$(cat "$intermediate_file" | sed 1d | prep_sed) datetime_created_unix=$(get_creation_date_from_meta_file_seconds "$meta_file") datetime_created_rfc3339=$(date -u "+%Y-%m-%dT%TZ" -d "@${datetime_created_unix}") -datetime_created_friendly=$(date -u "+%Y-%m-%d %T (UTC)" -d "@${datetime_created_unix}") +datetime_created_friendly=$(date -u "+%Y-%m-%d %H:%M (UTC)" -d "@${datetime_created_unix}") # Put data into template. template=$(cat "$template_file") diff --git a/test.sh b/test.sh index 60ce2bd..f7e54e9 100755 --- a/test.sh +++ b/test.sh @@ -101,7 +101,7 @@ for file in "$expected_files_dir"/*.html.ignoring; do cat "$cmp_file" | \ sed 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/IGNORE/g' | \ sed 's/IGNORET[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}Z/IGNORE/g' | \ - sed 's/IGNORE [0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\} (UTC)/IGNORE/g' \ + sed 's/IGNORE [0-9]\{2\}:[0-9]\{2\} (UTC)/IGNORE/g' \ > "$generated_file" diff_test "$file" "$generated_file" done