tinytime 介绍
<1kb的简单日期和时间格式化程序?
API
tinytime导出单个 函数 ,该 函数 返回模板对象。该对象只有 一个 方法 ,render该 方法 采用a Date并返回包含渲染数据的字符串。
import tinytime from 'tinytime';
const template = tinytime('The time is {h}:{mm}:{ss}{a}.');
template.render(new Date());
// The time is 11:10:20PM.
?
GitHub: https://github.com/aweary/tinytime
网站描述: 简单的日期和时间格式
tinytime官方网站
官方网站:
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did174896