0.0.2 ā€¢ Published 10 months ago

dtg-format v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

dtg-format

npm version npm downloads Github Actions CI License

šŸ“† Convert date to DTG

Install

# Using npm
npm install dtg-format

# Using yarn
yarn add dtg-format

Usage

toDTG(date: Date, withTimezone?: boolean

Format a date object to dtg-format. withTimezone is default false, if true its add the local computer timezone.

// CommonJS
const { toDTG } = require("dtg-format");

// ESM
import { toDTG } from "dtg-format";

const date = new Date("August 19, 2022 23:15:30 UTC+2");
const dtg = toDTG(date);

--> "192315aug22"

License

Published under MIT - Made with ā¤ļø by Conner Bachmann

0.0.2

10 months ago