changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: apps/blagh: use new datei and datet functions

changeset 664: df20e7e8792a
parent 663: 5c2c279b6320
child 665: 5314c20efddb
author: sl
date: Wed, 10 Feb 2016 20:33:27 -0500
files: apps/blagh/app.rc apps/blagh/atom.tpl
description: apps/blagh: use new datei and datet functions
     1.1--- a/apps/blagh/app.rc	Wed Feb 10 20:32:57 2016 -0500
     1.2+++ b/apps/blagh/app.rc	Wed Feb 10 20:33:27 2016 -0500
     1.3@@ -26,7 +26,7 @@
     1.4         if(check_user $conf_blog_editors) {
     1.5             editor_mode=on
     1.6             if(~ $"post_arg_date '')
     1.7-                post_date=`{date -i|sed 's,-,/,g'}  # date -i is 9front/9base only
     1.8+                post_date=`{datei|sed 's,-,/,g'}
     1.9             if not
    1.10                 post_date=$post_arg_date
    1.11             ll_add handlers_bar_left echo '<a href="'$blagh_uri'new_post">Make a new post</a>'
     2.1--- a/apps/blagh/atom.tpl	Wed Feb 10 20:32:57 2016 -0500
     2.2+++ b/apps/blagh/atom.tpl	Wed Feb 10 20:33:27 2016 -0500
     2.3@@ -5,7 +5,7 @@
     2.4 fn statpost {
     2.5     f = $1
     2.6 
     2.7-    updated = `{date -t `{mtime $f | awk '{print $1}'}} # date -t is 9front/9base only
     2.8+    updated = `{datet `{mtime $f | awk '{print $1}'}}
     2.9     post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/'
    2.10     title=`{read $f/index.md}
    2.11     # Not used: date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}}
    2.12@@ -16,7 +16,7 @@
    2.13     #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } }
    2.14     ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } }
    2.15 }
    2.16-updated = `{date -t} # date -t is 9front/9base only
    2.17+updated = `{datet}
    2.18 %}
    2.19 
    2.20 <feed xmlns="http://www.w3.org/2005/Atom"