Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

format-datetime-sunset

1.0.2 • Public • Published

format-datetime-sunset

Build Status License Downloads

npm badge

Usage

时间戳(秒)转化日期 - Timestamp date formatting tool

下载 - download

npm install format-datetime-sunset --save

引用模块 - Reference module

let formatDateTime = require("format-datetime-sunset");
import formatDateTime from "format-datetime-sunset";

使用示例 - Use example

let timestamp = '1559707594'
//年月日时分秒
let result = formatDateTime(timestamp,"long")
//年月日
let result = formatDateTime(timestamp,"date")
//月日
let result = formatDateTime(timestamp,"day")
//时分秒
let result = formatDateTime(timestamp,"time")
//时分
let result = formatDateTime(timestamp,"short-time")

Install

npm i format-datetime-sunset

DownloadsWeekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

3.27 kB

Total Files

5

Last publish

Collaborators

  • avatar