Skip to content

Initialise and set default locale to GB #486

Description

@henryjameslau

Use the initialise helper function use d3.formatDefaultLocale() and d3.timeFormatDefaultLocale() functions to set the locale to be GB.

d3.formatDefaultLocale({
  decimal: ".",
  thousands: ",",
  grouping: [3],
  currency: ["£", ""]
});

and

d3.timeFormatDefaultLocale({
  dateTime: "%a %e %b %Y %X",
  date: "%d/%m/%Y",
  time: "%H:%M:%S",
  periods: ["AM", "PM"],
  days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions