NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #566 most downloaded on npm
A JavaScript time formatter and parser inspired by strftime and strptime.
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 1.2 years
Most releases are documented
notes for 26 of 35 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
36 releases · first in 2014
Update locale definitions. #100 #104 #106
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ .
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ.
One column per quarter.
This release adopts ES2015 language features such as for-of and drops support for older browsers, including IE. If you need to support pre-ES2015 envi
This release adopts ES2015 language features such as for-of and drops support for older browsers, including IE. If you need to support pre-ES2015 environments, you should stick with d3-time-format 2.x or use a transpiler.
Nothing published for this version
Add ISO 8601 “week year” (%G and %g). Thanks, @davinov ! #52
Declare setting the default locale as a side effect.
Add fa-IR locale. Thanks, @mohsentaleb !
Restore missing locale files on publish.
Add %q directive for quarter of the year as a decimal number. Thanks, @jheer !
%q directive for quarter of the year as a decimal number. Thanks, @jheer!%U when the year starts with Sunday. #62%W when the year starts with Monday. #62%L or %f in conjunction with %s. #60Housekeeping.
Add nb-NO locale. Thanks, @simenheg!
Add tr-TR locale. Thanks, @filiz137!
Add %Q for milliseconds since UNIX epoch. Thanks, @krukon!
%f for microseconds.%Q for milliseconds since UNIX epoch. Thanks, @krukon!%s for seconds since UNIX epoch. Thanks, @krukon!%u for ISO 8601 day of week as a decimal number [1,7]. Thanks, @BrianMitchL!%V for ISO 8601 week of year as a decimal number [01, 53]. Thanks, @BrianMitchL!Nothing published for this version
Nothing published for this version
Nothing published for this version
Add module entry point to package.json.
module entry point to package.json.Add the cs-CA and uk-UA locales.
Change the default U.S. English locale to conform to local conventions (#19).
Add d3.timeFormatDefaultLocale.
Pursuant to the great namespace flattening, the format constructors have new names:
Pursuant to the great namespace flattening, the format constructors have new names:
The format.parse method has also been removed in favor of separate d3.timeParse, d3.utcParse and d3.isoParse parser constructors. Thus, this code in 3.x:
var parseTime = d3.time.format("%c").parse;
Can be rewritten in 4.0 as:
var parseTime = d3.timeParse("%c");
The multi-scale time format d3.time.format.multi has been replaced by d3.scaleTime’s tick format. Time formats now coerce inputs to dates, and time parsers coerce inputs to strings. The %Z directive now allows more flexible parsing of time zone offsets, such as -0700, -07:00, -07, and Z. The %p directive is now parsed correctly when the locale’s period name is longer than two characters (e.g., “a.m.”).
The default U.S. English locale now uses 12-hour time and a more concise representation of the date. This aligns with local convention and is consistent with date.toLocaleString in Chrome, Firefox and Node:
var now = new Date;
d3.timeFormat("%c")(new Date); // "6/23/2016, 2:01:33 PM"
d3.timeFormat("%x")(new Date); // "6/23/2016"
d3.timeFormat("%X")(new Date); // "2:01:38 PM"
You can now set the default locale using d3.timeFormatDefaultLocale! The locales are published as JSON to NPM.
The performance of time formatting and parsing has been improved, and the UTC formatter and parser have a cleaner implementation (that avoids temporarily overriding the Date global).
See CHANGES for all D3 changes since 3.x.
Export to the global d3 in vanilla environments (d3/d3#2840).
d3 in vanilla environments (d3/d3#2840).- Update d3.timeFormatZhCn.
Nothing published for this version
Rename timeFormat.parse to timeParse.
Nothing published for this version
Fix type coercion of inputs to _locale_.format and _format_.parse (#14).
Define d3-time-format module (and d3_time_format global), not timeFormat.
d3-time-format module (and d3_time_format global), not timeFormat.Adjust package.json definition for npm users.
The %Z directive can now parse time zone offsets of the form ±hh:mm, ±hh and Z, in addition to ±hhmm.
%Z directive can now parse time zone offsets of the form ±hh:mm, ±hh and Z, in addition to ±hhmm.Nothing published for this version
Nothing published for this version
localeFormat now accepts the name of a built-in locale, such as "en-US".
"en-US".A more robust implementation of utcFormat. (See d3/d3-time#5.)
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →