Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable no-console */
import { ZonedDateTime, ZoneId } from '@js-joda/core';
import '@js-joda/timezone';
const zdt = ZonedDateTime.now(ZoneId.of('America/New_York'));
console.log(zdt.toString());
console.log('es6-modules-03 done');
/* eslint-disable no-console */
require('@js-joda/timezone');
const { Instant, ZoneRulesProvider, ZoneId } = require('@js-joda/core');
const now = Instant.now();
for(const zoneId of ZoneRulesProvider.getAvailableZoneIds()) {
// console.log(zoneId, ZoneId.of(zoneId).rules().standardOffset(now).toString());
console.log(zoneId, ZoneId.of(zoneId).rules().offset(now).toString());
}
console.log('node-modules-06 done');
/* 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');
/*
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
*/
/* eslint-disable no-console, no-var */
import { DateTimeFormatter, ZonedDateTime, ZoneId } from '@js-joda/core';
import '@js-joda/timezone';
import { Locale } from './build/js-joda-locale';
const zdt = ZonedDateTime.of(2016, 1, 1, 0, 0, 0, 0, ZoneId.of('Europe/Berlin'));
// var zdt = joda.ZonedDateTime.of(2016, 1, 1, 0, 0, 0, 0, joda.ZoneId.of('America/Chicago'));
console.log('en_US formatted string:', zdt.format(DateTimeFormatter.ofPattern('eeee MMMM dd yyyy GGGG, hh:mm:ss a zzzz, \'Week \' ww, \'Quarter \' QQQ').withLocale(Locale.US)));
console.log('en_GB formatted string:', zdt.format(DateTimeFormatter.ofPattern('eeee MMMM dd yyyy GGGG, hh:mm:ss a zzzz, \'Week \' ww, \'Quarter \' QQQ').withLocale(Locale.UK)));
console.log('de_DE formatted string:', zdt.format(DateTimeFormatter.ofPattern('eeee MMMM dd yyyy GGGG, hh:mm:ss a zzzz, \'Week \' ww, \'Quarter \' QQQ').withLocale(Locale.GERMANY)));
console.log('fr_FR formatted string:', zdt.format(DateTimeFormatter.ofPattern('eeee MMMM dd yyyy GGGG, hh:mm:ss a zzzz, \'Week \' ww, \'Quarter \' QQQ').withLocale(Locale.FRANCE)));
Duration,
Instant,
LocalDate,
LocalDateTime,
ZonedDateTime,
ZoneId,
} from '@js-joda/core';
import {
Interval,
} from '@js-joda/extra';
import '@js-joda/timezone';
console.log(LocalDate.now().until(LocalDate.now().plusDays(10), ChronoUnit.DAYS));
console.log(LocalDateTime.now().toString());
console.log(ZonedDateTime.now().toString());
console.log(ZonedDateTime.now(ZoneId.of('America/New_York')).toString());
console.log(Interval.of(Instant.now(), Duration.ofMinutes(1)).toString());
console.log('webpack-index done');
require('@js-joda/timezone');
const {
Interval,
} = require('@js-joda/extra');
const {
Duration,
Instant,
LocalDateTime,
ZonedDateTime,
ZoneId,
} = require('@js-joda/core');
console.log(LocalDateTime.now().toString());
console.log(ZonedDateTime.now().toString());
console.log(ZonedDateTime.now(ZoneId.of('America/New_York')).toString());
console.log(Interval.of(Instant.now(), Duration.ofMinutes(1)).toString());
console.log('node-modules-01 done');
const {
Duration,
Instant,
LocalDateTime,
ZonedDateTime,
ZoneId,
} = require('@js-joda/core');
require('@js-joda/timezone');
const {
Interval,
} = require('@js-joda/extra');
console.log(LocalDateTime.now().toString());
console.log(ZonedDateTime.now().toString());
console.log(ZonedDateTime.now(ZoneId.of('America/New_York')).toString());
console.log(Interval.of(Instant.now(), Duration.ofMinutes(1)).toString());
console.log('node-modules-02 done');
Duration,
Instant,
LocalDate,
LocalDateTime,
ZonedDateTime,
ZoneId,
} from '@js-joda/core';
import {
Interval,
} from '@js-joda/extra';
import '@js-joda/timezone';
console.log(LocalDate.now().until(LocalDate.now().plusDays(10), ChronoUnit.DAYS));
console.log(LocalDateTime.now().toString());
console.log(ZonedDateTime.now().toString());
console.log(ZonedDateTime.now(ZoneId.of('America/New_York')).toString());
console.log(Interval.of(Instant.now(), Duration.ofMinutes(1)).toString());
console.log('es6-modules-01 done');