1.0.2 • Published 1 year ago

@peralva/custom-date v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.0.0

1 year ago