1.0.9 • Published 3 years ago

node-format-date v1.0.9

Weekly downloads
109
License
ISC
Repository
github
Last release
3 years ago

Format Date

Use to format date from Timestamp into indonesian format

Installation

npm

npm i node-format-date

yarn

yarn add node-format-date

Usage

const { formatFullDate, formatTime, formatDay, formatMonth, formatDate } = require('node-format-date');

const ts = new Date(); // 2020-12-29T05:25:43.223Z

console.log(formatFullDate(ts)); // Kamis, 29 Oktober 2020
console.log(formatDate(ts)); // 29 Oktober 2020
console.log(formatTime(ts)); // 11:31
console.log(formatDay(ts)); // Kamis
console.log(formatMonth(ts)); // Oktober
import React from 'react';
import { formatFullDate, formatTime, formatDay, formatMonth, formatDate } from 'node-format-date';

const FormatDate = () => {
    const ts = new Date() // 2020-12-29T05:25:43.223Z

    return (
        .....
        <p>{formatFullDate(ts)}</p> // Kamis, 29 Oktober 2020
        <p>{formatDate(ts)}</p> // 29 Oktober 2020
        <p>{formatTime(ts)}</p> // 11:31
        <p>{formatDay(ts)}</p> // Kamis
        <p>{formatMonth(ts)}</p> // Oktober
        .....
    )
}
1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago