@xutil/date

0.0.3 • Public • Published

Date 时间

x-date时间模块,可以单独安装使用。

📦 安装

  • 使用 npm 安装

    npm install @xutil/date -S
  • HTML直接引入

    <!DOCTYPE html>
       <html lang="en">
       <body>
          <script src="/dist/index-umd.js"></script>
          <script>
             console.log(XDate.parseTime(new Date()))
          </script>
       </body>
    </html>

🎨 使用

  • ESM导入使用

    // 全部引入
    import { parseTime } from "@xutil/date"
     console.log(parseTime(new Date()))
    
    // 按需引入
    import XDate from "@xutil/date"
     console.log(XDate.parseTime(new Date()))
  • RequireJS导入使用

    // 全部引入
    const XDate = require('@xutil/date')
    console.log(XDate.parseTime(new Date()))
    
    // 按需引入
    const { parseTime } = require('@xutil/date')
    console.log(parseTime(new Date()))

方法

    parseTime                       时间处理[new Date() => {y}{m}{d} {h}{i}{s}]

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @xutil/date

      Weekly Downloads

      1

      Version

      0.0.3

      License

      MIT

      Unpacked Size

      28.3 kB

      Total Files

      7

      Last publish

      Collaborators

      • veserise