time-translator

    1.0.0 • Public • Published

    What is Time Tanslator ?

    a tool for time-format transformation

    What does it can do ?

    • date to timeStamp
    • timeStamp to date

    Install

    npm install time-translator

    Example

      import { dt2ts, ts2dt } from 'time-translator';
     
      console.log(dt2ts('1997-09-16 08:05:09')); // 874368309000
      console.log(dt2ts('1997-09-16 08:05:09', 'u')); // 874368309 unix时间戳
      console.log(ts2dt(874368309000)); // 1997/09/16 08:05:09

    Install

    npm i time-translator

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    1.85 kB

    Total Files

    3

    Last publish

    Collaborators

    • yanqingxu