dtg-format
TypeScript icon, indicating that this package has built-in type declarations

0.0.2ย โ€ขย Publicย โ€ขย Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i dtg-format

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.95 kB

Total Files

9

Last publish

Collaborators

  • intevel