Get started with moment-timezone CDN
MIT licensed
Moment-timezone is a library that extends Moment.js for handling timezones.
Tags:- date
- moment
- timezone
- time
Stable version
Copied!
How to start using moment-timezone CDN
// Include the CDN link
const moment = require('moment-timezone')(require('moment/moment'));
moment.tz.add(['America/Los_Angeles'], {'abbr': 'PST', 'dstOffset': 240});
// Set the time in New York
const nyTime = moment.utc('2022-12-31T23:59:59').tz('America/New_York');
// Convert the time to Pacific Standard Time (PST)
const pstTime = nyTime.tz('America/Los_Angeles');
console.log('New York Time:', nyTime.format());
console.log('Pacific Standard Time:', pstTime.format());
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.0.1
0.0.2
0.0.3
0.0.5
0.0.6
0.1.0
0.2.0
0.2.1
0.2.2
0.2.3
0.2.4
0.2.5
0.3.0
0.3.1
0.4.0
0.4.1
0.5.0
0.5.1
0.5.10
0.5.11
0.5.12
0.5.13
0.5.14
0.5.15
0.5.16
0.5.17
0.5.18
0.5.19
0.5.2
0.5.20
0.5.21
0.5.22
0.5.23
0.5.24
0.5.25
0.5.26
0.5.27
0.5.28
0.5.29
0.5.3
0.5.30
0.5.31
0.5.32
0.5.33
0.5.34
0.5.35
0.5.36
0.5.37
0.5.38
0.5.39
0.5.4
0.5.40
0.5.41
0.5.42
0.5.43
0.5.44
0.5.45
*** 0.5.46
0.5.5
0.5.6
0.5.7
0.5.8
0.5.9