1.0.6 • Published 2 years ago
utils-format v1.0.6
Utils Format
Introduction
The library fulfills the requirements given by the products that I have made
Installation
npm install utils-format --saveUsage
const iDate = require('format-utils/iDate');OR
import iDate from 'format-utils/iDate';Available Format
iDate
Date format based on specific requirements (best suited for Vietnam)
let date = iDate(null,"Ngay {j} thang {n} nam {f}");
// Ngay 01 thang 12 nam 2021Type of format
- The many character represents the type of format.
D: day of the weekH: hoursJ: day of the monthM: minutesN: month of VietnameseO: dateS: secondsd: day of the week of Vietnamesef: yearsh: hour of Vietnamesej: day of the month of Vietnamesem: minutes of Vietnamesen: month of Vietnameses: seconds of Vietnameset: get timeu: timestampy: 2 last number of yearsA: PM/AMMonth: JanuaryMo: Jan
iParam
Encode param in url
Still growing ....