Combined adjustTz into formatDate
Some checks failed
Build / Tag Version (push) Has been cancelled
Build / Publish Documentation (push) Has been cancelled
Build / Build NPM Project (push) Has been cancelled

This commit is contained in:
2024-11-20 10:56:51 -05:00
parent 0fb1e13ba0
commit 87db4d4755
3 changed files with 52 additions and 19 deletions

View File

@ -6,10 +6,11 @@
</head>
<body>
<script type="module">
import {adjustTz, formatDate} from './dist/index.mjs';
import {formatDate} from './dist/index.mjs';
console.log(formatDate(new Date(), 'HH:mm:ss z'));
console.log(formatDate(adjustTz(new Date(), 0), 'HH:mm:ss z', 'UTC'));
console.log(formatDate(new Date(), 'HH:mm:ss z', 5));
console.log(formatDate(new Date(), 'HH:mm:ss z', 0));
console.log(formatDate(new Date(), 'HH:mm:ss z', -5));
</script>
</body>
</html>