How to use the d3-time-format.isoParse function in d3-time-format

To help you get started, we’ve selected a few d3-time-format 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 DefinitelyTyped / DefinitelyTyped / d3-time-format / d3-time-format-tests.ts View on Github external
// ----------------------------------------------------------------------

// local time -----------------------------------------------------------

formatFn = d3TimeFormat.timeFormat('.%L');
parseFn = d3TimeFormat.timeParse('.%L');

// utc ------------------------------------------------------------------

formatFn = d3TimeFormat.utcFormat('.%L');
parseFn = d3TimeFormat.utcParse('.%L');

// iso ------------------------------------------------------------------

let dateString: string = d3TimeFormat.isoFormat(new Date(2016, 6, 6));
let date: Date = d3TimeFormat.isoParse('2016-07-08T14:06:41.386Z');

// ----------------------------------------------------------------------
// Test Locale Definition
// ----------------------------------------------------------------------

let dateTimeSpecifier: string = localeDef.dateTime;
let dateSpecifier: string = localeDef.date;
let timeSpecifier: string = localeDef.time;
let periods: [string, string] = localeDef.periods;
let days: [string, string, string, string, string, string, string] = localeDef.days;
let shortDays: [string, string, string, string, string, string, string] = localeDef.shortDays;
let months: [string, string, string, string, string, string, string, string, string, string, string, string] = localeDef.months;
let shortMonths: [string, string, string, string, string, string, string, string, string, string, string, string] = localeDef.shortMonths;

localeDef = {
    dateTime: '%a %b %e %X %Y',
github DefinitelyTyped / DefinitelyTyped / types / d3-time-format / d3-time-format-tests.ts View on Github external
// ----------------------------------------------------------------------

// local time -----------------------------------------------------------

formatFn = d3TimeFormat.timeFormat('.%L');
parseFn = d3TimeFormat.timeParse('.%L');

// utc ------------------------------------------------------------------

formatFn = d3TimeFormat.utcFormat('.%L');
parseFn = d3TimeFormat.utcParse('.%L');

// iso ------------------------------------------------------------------

let dateString: string = d3TimeFormat.isoFormat(new Date(2016, 6, 6));
let date: Date = d3TimeFormat.isoParse('2016-07-08T14:06:41.386Z');

// ----------------------------------------------------------------------
// Test Locale Definition
// ----------------------------------------------------------------------

let dateTimeSpecifier: string = localeDef.dateTime;
let dateSpecifier: string = localeDef.date;
let timeSpecifier: string = localeDef.time;
let periods: [string, string] = localeDef.periods;
let days: [string, string, string, string, string, string, string] = localeDef.days;
let shortDays: [string, string, string, string, string, string, string] = localeDef.shortDays;
let months: [string, string, string, string, string, string, string, string, string, string, string, string] = localeDef.months;
let shortMonths: [string, string, string, string, string, string, string, string, string, string, string, string] = localeDef.shortMonths;

localeDef = {
    dateTime: '%a %b %e %X %Y',
github hashicorp / vault / ui / app / components / http-requests-bar-chart.js View on Github external
return counters.map(counter => {
      return assign({}, counter, { start_time: d3TimeFormat.isoParse(counter.start_time) });
    });
  }),
github LocusEnergy / ember-sparkles / addon / helpers / ember-sparkles / parse-data.js View on Github external
return data.map(({ [horizontalKey]: x, [verticalKey]: y }) => {
    return { [horizontalKey]: isoParse(x), [verticalKey]: y };
  });
}
github mozilla / sops / vendor / github.com / hashicorp / vault / ui / app / components / http-requests-bar-chart.js View on Github external
return counters.map(counter => {
      return assign({}, counter, { start_time: d3TimeFormat.isoParse(counter.start_time) });
    });
  }),
github hashicorp / vault / ui / app / components / http-requests-bar-chart-simple.js View on Github external
return counters.map((counter, index) => {
      return assign({}, counter, {
        start_time: d3TimeFormat.isoParse(counter.start_time),
        fill_color: index === counters.length - 1 ? UI_GRAY_300 : UI_GRAY_100,
      });
    });
  }),