@jithinp96/time-converter
v1.0.1
Published
Convert UTC dates into different timezones
Readme
@jithinp96/time-converter
A lightweight TypeScript utility package to convert UTC dates into any timezone using the native JavaScript Intl.DateTimeFormat API.
No external date libraries required.
Features
- Convert UTC dates into any timezone
- Supports custom locale formatting
- Supports all
Intl.DateTimeFormatoptions - Zero external dependencies
- Works in Node.js and browsers
- TypeScript support included
Installation
npm install @jithinp96/time-converterUsage
import { convertUtcToTimezone } from "@jithinp96/time-converter";
const result = convertUtcToTimezone({
utcDate: new Date(),
timezone: "Asia/Kolkata",
options: {
dateStyle: "full",
timeStyle: "long",
},
});
console.log(result);Example Output
Thursday, May 14, 2026 at 3:30:00 PM ISTLicense
MIT
