s4
changeset 571:27442a1d95c0
Support Wareki
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 24 Apr 2019 12:27:59 +0900 |
parents | 9328392f7c55 |
children | 95f2b54ea6d5 |
files | s4-blog.sh |
diffstat | 1 files changed, 19 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/s4-blog.sh Tue Apr 23 09:56:06 2019 +0900 1.2 +++ b/s4-blog.sh Wed Apr 24 12:27:59 2019 +0900 1.3 @@ -278,6 +278,22 @@ 1.4 icon, 1.5 a.rowid, 1.6 s.TIME, 1.7 + CASE WHEN s.TIME < '2019-05' 1.8 + THEN printf('平成%d年%d月%d日', 1.9 + substr(s.TIME, 1, 4)-1988, 1.10 + substr(s.TIME, 6, 2), 1.11 + substr(s.TIME, 9, 2)) 1.12 + WHEN s.TIME < '2020' 1.13 + THEN printf('令和元年%d月%d日', 1.14 + substr(s.TIME, 6, 2), 1.15 + substr(s.TIME, 9, 2)) 1.16 + WHEN s.TIME < '2050' 1.17 + THEN printf('令和%d年%d月%d日', 1.18 + substr(s.TIME, 1, 4)-2018, 1.19 + substr(s.TIME, 6, 2), 1.20 + substr(s.TIME, 9, 2)) 1.21 + ELSE s.TIME 1.22 + END reki, 1.23 CASE WHEN s.TIME > '$atime' THEN 'new' ELSE '' END newer, 1.24 hex(s.TEXT), 1.25 CASE -- File Accessibility to attached file 1.26 @@ -297,7 +313,8 @@ 1.27 a_s s 1.28 ON a.id=s.id; 1.29 EOF 1.30 - while IFS='|' read id edit notify uid author uname icon aid tm new hte fa imgids 1.31 + while IFS='|' read id edit notify uid author uname icon aid \ 1.32 + tm reki new hte fa imgids 1.33 do 1.34 cachefile="$td/$id.row.html" 1.35 stampfile="$td/$id.row.stamp" 1.36 @@ -333,7 +350,7 @@ 1.37 <tr id="$id"> 1.38 <td class="$tdcls">${picon}__EDIT__<a href="#$aid">#$aid</a> 1.39 <a href="$hlink+$uid" title="${author%@*}">$uname</a> 1.40 -$tm 1.41 +<span title="$tm">${reki:-$tm}</span> 1.42 <__NOTIFY__></td> 1.43 EOF 1.44 echo -n "<td id=\"$aid\" class=\"repl\">"