onedionys-timezone-conversion-utilities

5.0.0 • Public • Published

Welcome to One Dionys - Timezone Conversion Utilities! 👋

Functions to convert date and time between different time zones, facilitating global time management in web applications. 💖

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax

import { convertToTimezone } from 'timezone-conversion-utilities';

const date = new Date('2024-03-07T12:00:00Z');
const targetTimezone = 'America/New_York';

const convertedDate = convertToTimezone(date, targetTimezone);
console.log(convertedDate.toLocaleString());

Explanation

  • This package provides a simple utility function convertToTimezone that accepts a JavaScript Date object and a target timezone string (in IANA timezone format) as parameters. It returns a new Date object representing the same moment in time but in the specified timezone.

Return Value

  • The function convertToTimezone returns a new Date object representing the same moment in time but in the specified timezone.

📆 Release Date

  • v1.0.0 : 17 March 2024
  • v1.0.1 : 18 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - Timezone Conversion Utilities is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - Timezone Conversion Utilities? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

Package Sidebar

Install

npm i onedionys-timezone-conversion-utilities

Weekly Downloads

0

Version

5.0.0

License

ISC

Unpacked Size

12.5 kB

Total Files

8

Last publish

Collaborators

  • onedionys