This commit is contained in:
xmcp
2019-02-03 12:25:09 +08:00
parent 9820af106a
commit fdb88eef2e
6 changed files with 82 additions and 61 deletions

View File

@@ -18,14 +18,17 @@ function pad2(x) {
return x<10 ? '0'+x : ''+x;
}
export function format_time(time) {
return `${time.getMonth()+1}-${pad2(time.getDate())} ${time.getHours()}:${pad2(time.getMinutes())}:${pad2(time.getSeconds())}`;
}
export function Time(props) {
const time=new Date(props.stamp*1000);
return (
<span>
<TimeAgo date={time} formatter={chinese_format} />
&nbsp;
{time.getMonth()+1}-{time.getDate()}&nbsp;
{time.getHours()}:{pad2(time.getMinutes())}
{format_time(time)}
</span>
);
}
@@ -102,7 +105,7 @@ export function PromotionBar(props) {
return is_ios ? (
<div className="box promotion-bar">
<span className="icon icon-about" />&nbsp;
Safari 将本网站 <b>添加到主屏幕</b>
Safari 将本网站 <b>添加到主屏幕</b>
</div>
) : null;
}