How to use @js-joda/locale_en-us - 1 common examples

To help you get started, we’ve selected a few @js-joda/locale_en-us examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github js-joda / js-joda / packages / examples / examples / node / node-modules-07.js View on Github external
/* eslint-disable no-console */

const { DateTimeFormatter, ZonedDateTime, ZoneId } = require('@js-joda/core');
require('@js-joda/timezone');
const { Locale } = require('@js-joda/locale_en-us');

const zdt = ZonedDateTime.of(2017, 1, 1, 0, 0, 0, 0, ZoneId.of('Europe/Berlin'));
const dtf = DateTimeFormatter
    .ofPattern('eeee MMMM dd yyyy GGGG, hh:mm:ss a zzzz, zz, OOOO \'Week: \' ww, \'Quarter: \' QQQ')
    .withLocale(Locale.US);

console.log('Time in ' + zdt.zone());
console.log('');
console.log('en_US formatted string:', zdt.format(dtf));

console.log('node-modules-07 done');

@js-joda/locale_en-us

prebuilt js-joda locale package for locales: en,en-US

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

80 / 100
Full package analysis

Popular @js-joda/locale_en-us functions