showing results for - "javascript convert timezone name to abbreviation"
Arianna
19 Jan 2021
1// Doing this:
2
3<script src="moment.js"></script>
4<script src="moment-timezone.js"></script>
5<script src="moment-timezone-data.js"></script>
6<script>
7    moment().tz("America/Los_Angeles").zoneAbbr();
8</script>
9
10// Returns:
11
12'PDT' // Timezone's abbreviation