itxb-datetime

1.0.0 • Public • Published

##安装

npm install itxb-datetime

##导入

const date = require('itxb-datetime')

//格式化时间
//调用getDate()方法对时间进行格式化
const dateStr = date.getDate(new Date())

console.log(dateStr)


##转换HTML特殊字符串
//调用htmlUser()方法进行转换
const htmlSting = '<h1 class="a">比好</h1>'
const str = date.htmlUser(htmlSting)
console.log(str)

##还原 HTML 特殊字符串

const a = "<h1 class=&quota&quot>比好</h1>";
const b = date.htmlSting(a);
console.log(b);

##开源协议

ISC

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i itxb-datetime

      Weekly Downloads

      0

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      2.34 kB

      Total Files

      6

      Last publish

      Collaborators

      • itxb