Minimal utility to convert to or from any timezone. Deno/Node/Browser. ESM/CommonJS.

Overview

minitz

Node.js CI Deno CI npm version NPM Downloads jsdelivr Codacy Badge MIT License

Features

  • Convert dates between any timezone supported by the system.
  • Parses ISO8601 time strings.
  • MIT licensed, use the library any way you want. For real.
  • Minimal, no dependencies. Relies on JavaScript Intl and current best practises.
  • Works in Node.js >=14.0 (both require and import).
  • Works in Deno >=1.8.
  • Works in browsers as standalone, UMD or ES-module.
  • Includes TypeScript typings.

Usage

Converting a Date object to another timezone in JavaScript is possible using Intl feature of vanilla JS.

// Get current time in Asia/Tokyo, using vanilla js
new Date().toLocaleString("sv-SE", { timeZone: "Asia/Tokyo" });
// -> 2022-09-15 17:23:45

However - if you want to convert date/time from another timezone, or convert between different timezones, things get trickier.

Minitz is a minimal library built to solve the problem in the simplest possible way, and work in all environments (Node/Deno/Browser, ESM/UMD/CommonJS).

Short examples on converting from a remote timezone, and converting between different timezones.

// Get local time from time in Asia/Tokyo, using minitz and vanilla js
const localTime = minitz(2022,9,15,23,0,0,"Asia/Tokyo")
console.log( localTime.toLocaleString("sv-SE") );
// -> 2022-09-15 16:00:00
// Get time in America/New_York from time in Asia/Tokyo, using minitz and vanilla js
// Also demonstrates that it's possible to use ISO8601 strings as input to minitz, through `.fromTZISO`
const localTime = minitz.fromTZISO("2022-09-15 23:00:00","Asia/Tokyo");
console.log( localTime.toLocaleString("sv-SE", { timeZone: "America/New_York" }) );
// -> 2022-09-15 10:00:00

More examples further down, and full documentation available at hexagon.github.io/minitz.

Installation

Node.js

npm install minitz --save

JavaScript

// ESM Import ...
import minitz from "minitz";

// ... or CommonJS Require
const minitz = require("minitz");

TypeScript

Note that only default export is available in Node.js TypeScript, as the commonjs module is used internally.

import minitz from "minitz";

// ...

Deno

JavaScript

import minitz from "https://cdn.jsdelivr.net/gh/hexagon/minitz/src/minitz.js";

// ...

TypeScript

import { minitz } from "https://cdn.jsdelivr.net/gh/hexagon/minitz/src/minitz.js";

// ...

Browser

Manual

  • Download latest zipball
  • Unpack
  • Grab minitz.min.js (UMD and standalone) or minitz.min.mjs (ES-module) from the dist/ folder

CDN

To use as a UMD-module (stand alone, RequireJS etc.)

<script src="https://cdn.jsdelivr.net/npm/minitz/dist/minitz.min.js"></script>

To use as a ES-module

<script type="module">
	import minitz from "https://cdn.jsdelivr.net/npm/minitz/dist/minitz.min.mjs";

	// ... see usage section ...
</script>

More examples

Assuming you have imported minitz as described under 'Installation'.

Convert a specific timezone to local time

Standard way

// Convert 2022-09-10 23:08:09 in New York to local time (in this example Europe/Stockholm)
console.log("Local time: ", minitz(2022, 9, 10, 23, 8, 9, "America/New_York").toLocaleString("sv-SE"));
// Local time:  2022-09-11 05:08:09

If providing an ISO8601 timestring

// Convert 2022-09-10 23:08:09 in New York to local time (in this example Europe/Stockholm)
console.log("Local time: ", minitz("2022-09-10 23:08:99", "America/New_York").toLocaleString("sv-SE"));
// Local time:  2022-09-11 05:08:09

Convert local time to a specific timezone

Provided that you only neeed to display the result, converting local time to specific timezone is best done with vanilla JavaScript.

console.log("Time in New York printed with system locale: ", new Date().toLocaleString("sv-SE", { timeZone: "America/New_York"}));
// -> Time in New York printed with system locale:  2022-09-14 17:29:42

If you need to use the result in any way, it's better to use minitz to convert to a remote timezone. That way you get the results as an object, which also includes which timezone the time is converted to.

//  Convert to local time to time in America/New_York
//  As time in other timezones than local cannot be represented correctly by a date object
//  a generic object is returned
console.log("Time in New York: ", minitz.toTZ(new Date(), "America/New_York"));
// -> Time in New York: 
//  {
//     year: 2022,
//     month: 9,
//     day: 14,
//     hour: 17,
//     minute: 29,
//     second: 42,
//     timezone: 'America/New_York'
//  }

Contributing

Any contributions are welcome. See Contribution Guide

License

MIT

Comments
  • Bump rollup from 2.79.1 to 3.5.0

    Bump rollup from 2.79.1 to 3.5.0

    Bumps rollup from 2.79.1 to 3.5.0.

    Release notes

    Sourced from rollup's releases.

    v3.5.0

    3.5.0

    2022-11-27

    Features

    • Add treeshake.manualPureFunctions to override static analysis for explicit function names (#4718)

    Bug Fixes

    • Do not throw when a plugin uses this.load without awaiting its result (#4725)

    Pull Requests

    v3.4.0

    3.4.0

    2022-11-22

    Features

    • Do not keep unused Object.freeze calls on object literals (#4720)

    Pull Requests

    v3.3.0

    3.3.0

    2022-11-12

    Features

    • Add "experimentalMinChunkSize" option to merge smaller chunks into larger ones (#4705)
    • Automatically deduplicate assets again when the source is a Buffer (#4712)
    • Deduplicate Buffer with string assets (#4712)

    Bug Fixes

    • Support plugins with object hooks when using perf: true (#4707)

    Pull Requests

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    3.5.0

    2022-11-27

    Features

    • Add treeshake.manualPureFunctions to override static analysis for explicit function names (#4718)

    Bug Fixes

    • Do not throw when a plugin uses this.load without awaiting its result (#4725)

    Pull Requests

    3.4.0

    2022-11-22

    Features

    • Do not keep unused Object.freeze calls on object literals (#4720)

    Pull Requests

    3.3.0

    2022-11-12

    Features

    • Add "experimentalMinChunkSize" option to merge smaller chunks into larger ones (#4705)
    • Automatically deduplicate assets again when the source is a Buffer (#4712)
    • Deduplicate Buffer with string assets (#4712)

    Bug Fixes

    • Support plugins with object hooks when using perf: true (#4707)

    Pull Requests

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump rollup from 2.79.1 to 3.3.0

    Bump rollup from 2.79.1 to 3.3.0

    Bumps rollup from 2.79.1 to 3.3.0.

    Release notes

    Sourced from rollup's releases.

    v3.3.0

    3.3.0

    2022-11-12

    Features

    • Add "experimentalMinChunkSize" option to merge smaller chunks into larger ones (#4705)
    • Automatically deduplicate assets again when the source is a Buffer (#4712)
    • Deduplicate Buffer with string assets (#4712)

    Bug Fixes

    • Support plugins with object hooks when using perf: true (#4707)

    Pull Requests

    v3.2.5

    3.2.5

    2022-11-01

    Bug Fixes

    • We deconflicting classes, ensure the original class name still does not shadow variables (#4697)

    Pull Requests

    v3.2.4

    3.2.4

    2022-10-31

    Bug Fixes

    • Always use forward slashes in chunk ids when preserving modules, even on Windows (#4693)
    • Escape problematic characters in ids when rewriting import.meta.url (#4693)

    Pull Requests

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    3.3.0

    2022-11-12

    Features

    • Add "experimentalMinChunkSize" option to merge smaller chunks into larger ones (#4705)
    • Automatically deduplicate assets again when the source is a Buffer (#4712)
    • Deduplicate Buffer with string assets (#4712)

    Bug Fixes

    • Support plugins with object hooks when using perf: true (#4707)

    Pull Requests

    3.2.5

    2022-11-01

    Bug Fixes

    • We deconflicting classes, ensure the original class name still does not shadow variables (#4697)

    Pull Requests

    3.2.4

    2022-10-31

    Bug Fixes

    • Always use forward slashes in chunk ids when preserving modules, even on Windows (#4693)
    • Escape problematic characters in ids when rewriting import.meta.url (#4693)

    Pull Requests

    3.2.3

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump rollup from 2.79.1 to 3.2.4

    Bump rollup from 2.79.1 to 3.2.4

    Bumps rollup from 2.79.1 to 3.2.4.

    Release notes

    Sourced from rollup's releases.

    v3.2.4

    3.2.4

    2022-10-31

    Bug Fixes

    • Always use forward slashes in chunk ids when preserving modules, even on Windows (#4693)
    • Escape problematic characters in ids when rewriting import.meta.url (#4693)

    Pull Requests

    v3.2.3

    3.2.3

    2022-10-18

    Bug Fixes

    • Fix an issue whre Rollup confused new.target with import.meta (#4679)
    • Ensure that Rollup does not make assumptions about the value of unknown namespace import members (#4684)

    Pull Requests

    v3.2.2

    3.2.2

    2022-10-16

    Bug Fixes

    • Do not hang/crash on hashbang comments in input modules (#4676)

    Pull Requests

    v3.2.1

    3.2.1

    2022-10-16

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    3.2.4

    2022-10-31

    Bug Fixes

    • Always use forward slashes in chunk ids when preserving modules, even on Windows (#4693)
    • Escape problematic characters in ids when rewriting import.meta.url (#4693)

    Pull Requests

    3.2.3

    2022-10-18

    Bug Fixes

    • Fix an issue whre Rollup confused new.target with import.meta (#4679)
    • Ensure that Rollup does not make assumptions about the value of unknown namespace import members (#4684)

    Pull Requests

    3.2.2

    2022-10-16

    Bug Fixes

    • Do not hang/crash on hashbang comments in input modules (#4676)

    Pull Requests

    3.2.1

    2022-10-16

    Bug Fixes

    • Rewrite class declarations to preserve their .name property if necessary (#4674)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump typescript from 4.8.3 to 4.8.4

    Bump typescript from 4.8.3 to 4.8.4

    Bumps typescript from 4.8.3 to 4.8.4.

    Release notes

    Sourced from typescript's releases.

    TypeScript 4.8.4

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump rollup from 2.79.1 to 3.9.0

    Bump rollup from 2.79.1 to 3.9.0

    Bumps rollup from 2.79.1 to 3.9.0.

    Release notes

    Sourced from rollup's releases.

    v3.9.0

    3.9.0

    2022-12-28

    Features

    • Support ES2022 arbitrary module namespace identifiers (#4770)
    • Add optional version property to plugin type (#4771)

    Pull Requests

    v3.8.1

    3.8.1

    2022-12-23

    Bug Fixes

    • Reduce memory footprint when explicitly passing cache: false (#4762)
    • Fix a crash when preserving modules and reexporting namespaces (#4766)

    Pull Requests

    v3.8.0

    3.8.0

    2022-12-22

    Features

    • Deduplicate ESM exports and reexports when preserving modules (#4759)

    Bug Fixes

    • Handle files that are emitted as a side effect of the manualChunks option (#4759)

    Pull Requests

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    3.9.0

    2022-12-28

    Features

    • Support ES2022 arbitrary module namespace identifiers (#4770)
    • Add optional version property to plugin type (#4771)

    Pull Requests

    3.8.1

    2022-12-23

    Bug Fixes

    • Reduce memory footprint when explicitly passing cache: false (#4762)
    • Fix a crash when preserving modules and reexporting namespaces (#4766)

    Pull Requests

    3.8.0

    2022-12-22

    Features

    • Deduplicate ESM exports and reexports when preserving modules (#4759)

    Bug Fixes

    • Handle files that are emitted as a side effect of the manualChunks option (#4759)

    Pull Requests

    3.7.5

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump typescript from 4.9.3 to 4.9.4

    Bump typescript from 4.9.3 to 4.9.4

    Bumps typescript from 4.9.3 to 4.9.4.

    Release notes

    Sourced from typescript's releases.

    TypeScript 4.9.4

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Changes:

    • e2868216f637e875a74c675845625eb15dcfe9a2 Bump version to 4.9.4 and LKG.
    • eb5419fc8d980859b98553586dfb5f40d811a745 Cherry-pick #51704 to release 4.9 (#51712)
    • b4d382b9b12460adf2da4cc0d1429cf19f8dc8be Cherry-pick changes for narrowing to tagged literal types.
    • e7a02f43fce47e1a39259ada5460bcc33c8e98b5 Port of #51626 and #51689 to release-4.9 (#51627)
    • 1727912f0437a7f367d90040fc4b0b4f3efd017a Cherry-pick fix around visitEachChild to release-4.9. (#51544)

    This list of changes was auto generated.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump eslint from 8.28.0 to 8.31.0

    Bump eslint from 8.28.0 to 8.31.0

    Bumps eslint from 8.28.0 to 8.31.0.

    Release notes

    Sourced from eslint's releases.

    v8.31.0

    Features

    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)

    Bug Fixes

    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)

    Documentation

    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)

    Chores

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0

    Features

    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)

    Documentation

    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)

    ... (truncated)

    Changelog

    Sourced from eslint's changelog.

    v8.31.0 - December 31, 2022

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0 - December 16, 2022

    • f2c4737 chore: upgrade @​eslint/eslintrc@​1.4.0 (#16675) (Milos Djermanovic)
    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • ba74253 chore: standardize npm script names per #14827 (#16315) (Patrick McElhaney)
    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • 0d9af4c ci: fix npm v9 problem with file: (#16664) (Milos Djermanovic)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 90c9219 refactor: migrate off deprecated function-style rules in all tests (#16618) (Bryan Mishkin)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)
    • 8ba124c docs: update the prefer-const example (#16607) (Pavel)
    • e6cb05a docs: fix css leaking (#16603) (Sam Chen)

    v8.29.0 - December 2, 2022

    • 0311d81 docs: Configuring Plugins page intro, page tweaks, and rename (#16534) (Ben Perlmutter)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump jsdoc from 3.6.11 to 4.0.0

    Bump jsdoc from 3.6.11 to 4.0.0

    Bumps jsdoc from 3.6.11 to 4.0.0.

    Changelog

    Sourced from jsdoc's changelog.

    4.0.0 (November 2022)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(4.0.4)
  • 4.0.4(Nov 27, 2022)

  • 4.0.3(Nov 13, 2022)

    Changes

    • chore: Code cleanup
    • chore: Add Bun CI pipeline
    • docs: Add vun section under Installation

    Full Changelog: https://github.com/Hexagon/minitz/compare/4.0.2...4.0.3

    Source code(tar.gz)
    Source code(zip)
  • 4.0.2(Nov 12, 2022)

  • 4.0.1(Oct 30, 2022)

    Changes

    • Fixes rare bug showing in some DST transitions
    • Added tests

    Full Changelog: https://github.com/Hexagon/minitz/compare/4.0.0...4.0.1

    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Oct 7, 2022)

    Changes

    • breaking: Change timepoint interface, second -> s etc.
    • chore: Keeping code base compact

    Full Changelog: https://github.com/Hexagon/minitz/compare/3.0.1...4.0.0

    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Sep 26, 2022)

    Changes

    • fix(docs): Bump major version in Deno documentation
    • feat(docs): Add jsfiddle time zone converter example in README.md/documentation,

    Full Changelog: https://github.com/Hexagon/minitz/compare/3.0.0...3.0.1

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Sep 23, 2022)

    Changes

    • breaking: Stop exporting non minified cjs to npm
    • fix: Use Date.parse instead of custom ISO8601 parsing function
    • chore: Additional tests

    Full Changelog: https://github.com/Hexagon/minitz/compare/2.1.3...3.0.0

    Source code(tar.gz)
    Source code(zip)
  • 2.1.3(Sep 18, 2022)

    What's Changed

    • fix: adjusting grammar in files #1 by @coleenho in https://github.com/Hexagon/minitz/pull/3
    • fix: JSDoc bugs
    • chore: code cleanup

    New Contributors

    • @coleenho made their first contribution in https://github.com/Hexagon/minitz/pull/3

    Full Changelog: https://github.com/Hexagon/minitz/compare/2.1.2...2.1.3

    Source code(tar.gz)
    Source code(zip)
  • 2.1.2(Sep 16, 2022)

    What's Changed

    • Fixes #1 - Grammar / syntax check for docs and comments by @danieled-it in https://github.com/Hexagon/minitz/pull/2
    • Update docs with latest changes

    New Contributors

    • @danieled-it made their first contribution in https://github.com/Hexagon/minitz/pull/2

    Full Changelog: https://github.com/Hexagon/minitz/compare/2.1.1...2.1.2

    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Sep 16, 2022)

    Changes

    • Handle ISO8601 UTC time strings correctly.
    • Update docs
    • Added tests

    Full Changelog: https://github.com/Hexagon/minitz/compare/2.1.0...2.1.1

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Sep 15, 2022)

    Changes

    • Code cleanup
    • Documentation
    • Add .toTZISO(...) for using ISO8601 formatted time string as input to minitz

    Full Changelog: https://github.com/Hexagon/minitz/compare/2.0.0...2.1.0

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Sep 14, 2022)

    Breaking

    • Add shortcut to convert from a specific timezone to local minitz(y,m,d,h,i,s,tz);
    • Introduce TimePoint object instead of faux dates
    • Allow creating faux dates from TimePoint using new function minitz.fauxDate()

    Full Changelog: https://github.com/Hexagon/minitz/compare/1.0.1...2,0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Sep 9, 2022)

  • 1.0.0(Sep 9, 2022)

  • 0.0.3(Sep 8, 2022)

    Changes

    • More tests, both Node and Deno
    • Code cleanup, documentation and simplification
    • Various bugfixes
    • Added option to throw if inputing an invalid date (e.g. a date with a time skipped by DST transition)

    Full Changelog: https://github.com/Hexagon/minitz/compare/0.0.2...0.0.3

    Source code(tar.gz)
    Source code(zip)
  • 0.0.2(Sep 7, 2022)

Owner
Hexagon
Hexagon
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
Node.js loader for compiling ESM & TypeScript modules to CommonJS

cjs-loader Node.js require() hook to instantaneously transform ESM & TypeScript to CommonJS on demand using esbuild. Features Transforms ESM & TypeScr

esbuild kit 40 Dec 13, 2022
Universal importer for CommonJS and ESM in Node.js

ModuleImporter by Nicholas C. Zakas If you find this useful, please consider supporting my work with a donation. Description A utility for seamlessly

Human Who Codes 18 Dec 2, 2022
Babel plugin and helper functions for interoperation between Node.js native ESM and Babel ESM

babel-plugin-node-cjs-interop and node-cjs-interop: fix the default import interoperability issue in Node.js The problem to solve Consider the followi

Masaki Hara 15 Nov 6, 2022
📦 🍣 Zero-config JS bundler for ESM, CommonJS, and .d.ts outputs

pkgroll Write your code in ESM & TypeScript and bundle it to get ESM, CommonJS, and type declaration outputs with a single command! Features Zero conf

hiroki osame 153 Dec 23, 2022
Recursively publish ESM packages as CommonJS!

Commonify.js For us who are still relying on CommonJS, or using Electron which does not support ESM. ?? See also build-electron I made this tool that

Mikael Finstad 31 Dec 29, 2022
📦 🍣 Zero-config JS bundler for ESM, CommonJS, and .d.ts outputs. (Forked from pkgroll)

?? ?? puild (A fork of pkgroll) Write your code in ESM & TypeScript and bundle it to get ESM, CommonJS, and type declaration outputs with a single com

ʀᴀʏ 6 Sep 6, 2022
💠 Webapp to see what time is in any timezone

Timero Webapp to see what time is in any timezone. Deploy https://ultirequiem.github.io/timero Characteristic Responsive Design Uses Packup as Bundler

Eliaz Bobadilla 7 May 15, 2022
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
CLI utility that parses argv, loads your specified file, and passes the parsed argv into your file's exported function. Supports ESM/TypeScript/etc out of the box.

cleffa CLI tool that: Parses argv into an object (of command-line flags) and an array of positional arguments Loads a function from the specified file

Lily Scott 9 Mar 6, 2022
Deno module to convert fiat currencies with fetched API from fixer.io

Usage example Deno module to convert fiat money currencies with initial fetched API from fixer.io There are two different modes for this module. Mode

Michel M. 6 Jan 29, 2022
Node.js ESM loader for chaining multiple custom loaders.

ESMultiloader Node.js ESM loader for chaining multiple custom loaders. Fast and lightweight No configuration required, but configurable if needed Usag

jhmaster2000 2 Sep 12, 2022
Node.js loader for compiling TypeScript modules to ESM

esm-loader Node.js import hook to instantaneously transform TypeScript to ESM on demand using esbuild. Features Transforms TypeScript to ESM on demand

esbuild kit 90 Jan 4, 2023
Convert any webpage into bionified text!

Bionify - Read Faster! LEGAL NOTICE: To the wonderful folks at Bionic Reading®, this is not a pirated version of your Bionic Reading® API, but rather

Vincent 96 Dec 8, 2022
A NodeJS package to convert any RGB color to HEX color or viceversa. Also supports HSL conversion.

Unhex ?? A NodeJS package to convert any RGB color to HEX, HSL color or viceversa. Example div { color: #fff; background-color: #0070f3; } After r

Arnau Espin 2 Oct 1, 2022
This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Bruno Bernardino 15 Dec 3, 2022
TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy

Atlas SDK atlas_sdk is a TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy Links Docs Import Replace LATEST_VERSION with current latest versi

Erfan Safari 20 Dec 26, 2022
Deno bindings for yoga, using Deno FFI.

deno_yoga Deno bindings for yoga, using Deno FFI. Usage flags: --allow-ffi: Requires ffi access to "yogacore.dll", "libyogacore.so", "libyogacore.dyli

迷渡 6 Feb 11, 2022
🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Denosaurs 26 Dec 10, 2022