1.0.2 • Published 11 months ago

@peralva/custom-date v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@peralva/custom-date

Custom Date

NPM Version GitHub Release Date GitHub License NPM Downloads NPM Publish

Installation

npm install --save @peralva/custom-date

Usage

Get date string from a mask

import { CustomDate } from '@peralva/custom-date';

const date = new CustomDate();

const stringDate = date.toCustomString('yyyy-MM-dd HH:mm:ss.SSS', {
	timezone: -180,
});

console.log(stringDate);

Change date instance from a mask

import { CustomDate } from '@peralva/custom-date';

const date = new CustomDate();

date.fromString('20241214 12:34:56.789', 'yyyyMMdd HH:mm:ss.SSS', {
	timezone: -180,
});

console.log(date);
1.0.2

11 months ago

1.0.0

11 months ago