Socket
Socket
Sign inDemoInstall

d3-time-format

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-time-format - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

src/isoParse.js

2

build/bundle.js

@@ -1,1 +0,1 @@

var version = "0.2.1"; export * from "../index"; export {version};
var version = "0.3.0"; export * from "../index"; export {version};

@@ -299,11 +299,19 @@ (function (global, factory) {

var f = newFormat(specifier += "", formats);
f.parse = newParse(specifier, localDate);
f.toString = function() { return specifier; };
return f;
},
parse: function(specifier) {
var p = newParse(specifier += "", localDate);
p.toString = function() { return specifier; };
return p;
},
utcFormat: function(specifier) {
var f = newFormat(specifier += "", utcFormats);
f.parse = newParse(specifier, utcDate);
f.toString = function() { return specifier; };
return f;
},
utcParse: function(specifier) {
var p = newParse(specifier, utcDate);
p.toString = function() { return specifier; };
return p;
}

@@ -421,3 +429,3 @@ };

function formatDayOfYear(d, p) {
return pad(1 + d3Time.day.count(d3Time.year(d), d), p, 3);
return pad(1 + d3Time.timeDay.count(d3Time.timeYear(d), d), p, 3);
}

@@ -442,3 +450,3 @@

function formatWeekNumberSunday(d, p) {
return pad(d3Time.sunday.count(d3Time.year(d), d), p, 2);
return pad(d3Time.timeSunday.count(d3Time.timeYear(d), d), p, 2);
}

@@ -451,3 +459,3 @@

function formatWeekNumberMonday(d, p) {
return pad(d3Time.monday.count(d3Time.year(d), d), p, 2);
return pad(d3Time.timeMonday.count(d3Time.timeYear(d), d), p, 2);
}

@@ -778,48 +786,53 @@

formatIsoNative.parse = function(string) {
var formatIso = Date.prototype.toISOString
? formatIsoNative
: locale.utcFormat(isoSpecifier);
function parseIsoNative(string) {
var date = new Date(string);
return isNaN(date) ? null : date;
};
}
formatIsoNative.toString = function() {
return isoSpecifier;
};
var parseIso = +new Date("2000-01-01T00:00:00.000Z")
? parseIsoNative
: locale.utcParse(isoSpecifier);
var formatIso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z")
? formatIsoNative
: locale.utcFormat(isoSpecifier);
var format = locale.format;
var timeFormat = locale.format;
var timeParse = locale.parse;
var utcFormat = locale.utcFormat;
var utcParse = locale.utcParse;
var version = "0.2.1";
var version = "0.3.0";
exports.version = version;
exports.format = format;
exports.timeFormat = timeFormat;
exports.timeParse = timeParse;
exports.utcFormat = utcFormat;
exports.locale = locale$1;
exports.localeCaEs = caES;
exports.localeDeCh = deCH;
exports.localeDeDe = deDE;
exports.localeEnCa = enCA;
exports.localeEnGb = enGB;
exports.localeEnUs = locale;
exports.localeEsEs = esES;
exports.localeFiFi = fiFI;
exports.localeFrCa = frCA;
exports.localeFrFr = frFR;
exports.localeHeIl = heIL;
exports.localeHuHu = huHU;
exports.localeItIt = itIT;
exports.localeJaJp = jaJP;
exports.localeKoKr = koKR;
exports.localeMkMk = mkMK;
exports.localeNlNl = nlNL;
exports.localePlPl = plPL;
exports.localePtBr = ptBR;
exports.localeRuRu = ruRU;
exports.localeSvSe = svSE;
exports.localeZhCn = zhCN;
exports.utcParse = utcParse;
exports.timeFormatLocale = locale$1;
exports.timeFormatCaEs = caES;
exports.timeFormatDeCh = deCH;
exports.timeFormatDeDe = deDE;
exports.timeFormatEnCa = enCA;
exports.timeFormatEnGb = enGB;
exports.timeFormatEnUs = locale;
exports.timeFormatEsEs = esES;
exports.timeFormatFiFi = fiFI;
exports.timeFormatFrCa = frCA;
exports.timeFormatFrFr = frFR;
exports.timeFormatHeIl = heIL;
exports.timeFormatHuHu = huHU;
exports.timeFormatItIt = itIT;
exports.timeFormatJaJp = jaJP;
exports.timeFormatKoKr = koKR;
exports.timeFormatMkMk = mkMK;
exports.timeFormatNlNl = nlNL;
exports.timeFormatPlPl = plPL;
exports.timeFormatPtBr = ptBR;
exports.timeFormatRuRu = ruRU;
exports.timeFormatSvSe = svSE;
exports.timeFormatZhCn = zhCN;
exports.isoFormat = formatIso;
exports.isoParse = parseIso;
}));

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-time")):"function"==typeof define&&define.amd?define("d3-time-format",["exports","d3-time"],t):t(e.d3_time_format={},e.d3_time)}(this,function(e,t){"use strict";function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function o(e){function t(e,t){return function(r){var n,a,o,u=[],i=-1,s=0,d=e.length;for(r instanceof Date||(r=new Date(+r));++i<d;)37===e.charCodeAt(i)&&(u.push(e.slice(s,i)),null!=(a=ee[n=e.charAt(++i)])?n=e.charAt(++i):a="e"===n?" ":"0",(o=t[n])&&(n=o(r,a)),u.push(n),s=i+1);return u.push(e.slice(s,i)),u.join("")}}function o(e,t){return function(r){var o=a(1900),i=u(o,e,r+="",0);if(i!=r.length)return null;if("p"in o&&(o.H=o.H%12+12*o.p),"W"in o||"U"in o){"w"in o||(o.w="W"in o?1:0);var s="Z"in o?n(a(o.y)).getUTCDay():t(a(o.y)).getDay();o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(s+5)%7:o.w+7*o.U-(s+6)%7}return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,n(o)):t(o)}}function u(e,t,r,n){for(var a,o,u=0,i=t.length,s=r.length;i>u;){if(n>=s)return-1;if(a=t.charCodeAt(u++),37===a){if(a=t.charAt(u++),o=Ue[a in ee?t.charAt(u++):a],!o||(n=o(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}function i(e,t,r){var n=Ye.exec(t.slice(r));return n?(e.p=je[n[0].toLowerCase()],r+n[0].length):-1}function q(e,t,r){var n=Fe.exec(t.slice(r));return n?(e.w=ke[n[0].toLowerCase()],r+n[0].length):-1}function te(e,t,r){var n=He.exec(t.slice(r));return n?(e.w=Je[n[0].toLowerCase()],r+n[0].length):-1}function re(e,t,r){var n=we.exec(t.slice(r));return n?(e.m=xe[n[0].toLowerCase()],r+n[0].length):-1}function ne(e,t,r){var n=ze.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1}function ae(e,t,r){return u(e,fe,t,r)}function oe(e,t,r){return u(e,be,t,r)}function ue(e,t,r){return u(e,Se,t,r)}function ie(e){return De[e.getDay()]}function se(e){return ve[e.getDay()]}function de(e){return Te[e.getMonth()]}function ce(e){return Ae[e.getMonth()]}function me(e){return pe[+(e.getHours()>=12)]}function le(e){return De[e.getUTCDay()]}function Me(e){return ve[e.getUTCDay()]}function he(e){return Te[e.getUTCMonth()]}function ye(e){return Ae[e.getUTCMonth()]}function ge(e){return pe[+(e.getUTCHours()>=12)]}var fe=e.dateTime,be=e.date,Se=e.time,pe=e.periods,ve=e.days,De=e.shortDays,Ae=e.months,Te=e.shortMonths,Ye=s(pe),je=d(pe),He=s(ve),Je=d(ve),Fe=s(De),ke=d(De),ze=s(Ae),Ce=d(Ae),we=s(Te),xe=d(Te),Le={a:ie,A:se,b:de,B:ce,c:null,d:T,e:T,H:Y,I:j,j:H,L:J,m:F,M:k,p:me,S:z,U:C,w:w,W:x,x:null,X:null,y:L,Y:P,Z:U,"%":$},Pe={a:le,A:Me,b:he,B:ye,c:null,d:X,e:X,H:N,I:O,j:B,L:W,m:Z,M:G,p:ge,S:E,U:I,w:K,W:Q,x:null,X:null,y:_,Y:R,Z:V,"%":$},Ue={a:q,A:te,b:re,B:ne,c:ae,d:f,e:f,H:S,I:S,j:b,L:D,m:g,M:p,p:i,S:v,U:m,w:c,W:l,x:oe,X:ue,y:h,Y:M,Z:y,"%":A};return Le.x=t(be,Le),Le.X=t(Se,Le),Le.c=t(fe,Le),Pe.x=t(be,Pe),Pe.X=t(Se,Pe),Pe.c=t(fe,Pe),{format:function(e){var n=t(e+="",Le);return n.parse=o(e,r),n.toString=function(){return e},n},utcFormat:function(e){var r=t(e+="",Pe);return r.parse=o(e,n),r.toString=function(){return e},r}}}function u(e,t,r){var n=0>e?"-":"",a=(n?-e:e)+"",o=a.length;return n+(r>o?new Array(r-o+1).join(t)+a:a)}function i(e){return e.replace(ne,"\\$&")}function s(e){return new RegExp("^(?:"+e.map(i).join("|")+")","i")}function d(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function c(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function m(e,t,r){var n=te.exec(t.slice(r));return n?(e.U=+n[0],r+n[0].length):-1}function l(e,t,r){var n=te.exec(t.slice(r));return n?(e.W=+n[0],r+n[0].length):-1}function M(e,t,r){var n=te.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function h(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function y(e,t,r){var n=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function g(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function f(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function b(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function S(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function p(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function v(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function D(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function A(e,t,r){var n=re.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function T(e,t){return u(e.getDate(),t,2)}function Y(e,t){return u(e.getHours(),t,2)}function j(e,t){return u(e.getHours()%12||12,t,2)}function H(e,r){return u(1+t.day.count(t.year(e),e),r,3)}function J(e,t){return u(e.getMilliseconds(),t,3)}function F(e,t){return u(e.getMonth()+1,t,2)}function k(e,t){return u(e.getMinutes(),t,2)}function z(e,t){return u(e.getSeconds(),t,2)}function C(e,r){return u(t.sunday.count(t.year(e),e),r,2)}function w(e){return e.getDay()}function x(e,r){return u(t.monday.count(t.year(e),e),r,2)}function L(e,t){return u(e.getFullYear()%100,t,2)}function P(e,t){return u(e.getFullYear()%1e4,t,4)}function U(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+u(t/60|0,"0",2)+u(t%60,"0",2)}function X(e,t){return u(e.getUTCDate(),t,2)}function N(e,t){return u(e.getUTCHours(),t,2)}function O(e,t){return u(e.getUTCHours()%12||12,t,2)}function B(e,r){return u(1+t.utcDay.count(t.utcYear(e),e),r,3)}function W(e,t){return u(e.getUTCMilliseconds(),t,3)}function Z(e,t){return u(e.getUTCMonth()+1,t,2)}function G(e,t){return u(e.getUTCMinutes(),t,2)}function E(e,t){return u(e.getUTCSeconds(),t,2)}function I(e,r){return u(t.utcSunday.count(t.utcYear(e),e),r,2)}function K(e){return e.getUTCDay()}function Q(e,r){return u(t.utcMonday.count(t.utcYear(e),e),r,2)}function _(e,t){return u(e.getUTCFullYear()%100,t,2)}function R(e,t){return u(e.getUTCFullYear()%1e4,t,4)}function V(){return"+0000"}function $(){return"%"}function q(e){return e.toISOString()}var ee={"-":"",_:" ",0:"0"},te=/^\s*\d+/,re=/^%/,ne=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ae=o({dateTime:"%a %b %e %X %Y",date:"%m/%d/%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"]}),oe=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],shortDays:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],months:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortMonths:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."]}),ue=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),ie=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),se=o({dateTime:"%a %b %e %X %Y",date:"%Y-%m-%d",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"]}),de=o({dateTime:"%a %e %b %X %Y",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"]}),ce=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]}),me=o({dateTime:"%A, %-d. %Bta %Y klo %X",date:"%-d.%-m.%Y",time:"%H:%M:%S",periods:["a.m.","p.m."],days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDays:["Su","Ma","Ti","Ke","To","Pe","La"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortMonths:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"]}),le=o({dateTime:"%a %e %b %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["",""],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim","lun","mar","mer","jeu","ven","sam"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["jan","fév","mar","avr","mai","jui","jul","aoû","sep","oct","nov","déc"]}),Me=o({dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]}),he=o({dateTime:"%A, %e ב%B %Y %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],shortDays:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],shortMonths:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"]}),ye=o({dateTime:"%Y. %B %-e., %A %X",date:"%Y. %m. %d.",time:"%H:%M:%S",periods:["de.","du."],days:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],shortDays:["V","H","K","Sze","Cs","P","Szo"],months:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortMonths:["jan.","feb.","már.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."]}),ge=o({dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]}),fe=o({dateTime:"%Y %b %e %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["AM","PM"],days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],shortDays:["日","月","火","水","木","金","土"],months:["睦月","如月","弥生","卯月","皐月","水無月","文月","葉月","長月","神無月","霜月","師走"],shortMonths:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}),be=o({dateTime:"%Y/%m/%d %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["오전","오후"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}),Se=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]}),pe=o({dateTime:"%a %e %B %Y %T",date:"%d-%m-%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]}),ve=o({dateTime:"%A, %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Niedz.","Pon.","Wt.","Śr.","Czw.","Pt.","Sob."],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Stycz.","Luty","Marz.","Kwie.","Maj","Czerw.","Lipc.","Sierp.","Wrz.","Paźdz.","Listop.","Grudz."]}),De=o({dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}),Ae=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],shortDays:["вс","пн","вт","ср","чт","пт","сб"],months:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],shortMonths:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]}),Te=o({dateTime:"%A den %d %B %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["fm","em"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"]}),Ye=o({dateTime:"%a %b %e %X %Y",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]}),je="%Y-%m-%dT%H:%M:%S.%LZ";q.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},q.toString=function(){return je};var He=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?q:ae.utcFormat(je),Je=ae.format,Fe=ae.utcFormat,ke="0.2.1";e.version=ke,e.format=Je,e.utcFormat=Fe,e.locale=o,e.localeCaEs=oe,e.localeDeCh=ue,e.localeDeDe=ie,e.localeEnCa=se,e.localeEnGb=de,e.localeEnUs=ae,e.localeEsEs=ce,e.localeFiFi=me,e.localeFrCa=le,e.localeFrFr=Me,e.localeHeIl=he,e.localeHuHu=ye,e.localeItIt=ge,e.localeJaJp=fe,e.localeKoKr=be,e.localeMkMk=Se,e.localeNlNl=pe,e.localePlPl=ve,e.localePtBr=De,e.localeRuRu=Ae,e.localeSvSe=Te,e.localeZhCn=Ye,e.isoFormat=He});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-time")):"function"==typeof define&&define.amd?define("d3-time-format",["exports","d3-time"],t):t(e.d3_time_format={},e.d3_time)}(this,function(e,t){"use strict";function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function o(e){function t(e,t){return function(r){var n,a,o,i=[],u=-1,s=0,m=e.length;for(r instanceof Date||(r=new Date(+r));++u<m;)37===e.charCodeAt(u)&&(i.push(e.slice(s,u)),null!=(a=te[n=e.charAt(++u)])?n=e.charAt(++u):a="e"===n?" ":"0",(o=t[n])&&(n=o(r,a)),i.push(n),s=u+1);return i.push(e.slice(s,u)),i.join("")}}function o(e,t){return function(r){var o=a(1900),u=i(o,e,r+="",0);if(u!=r.length)return null;if("p"in o&&(o.H=o.H%12+12*o.p),"W"in o||"U"in o){"w"in o||(o.w="W"in o?1:0);var s="Z"in o?n(a(o.y)).getUTCDay():t(a(o.y)).getDay();o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(s+5)%7:o.w+7*o.U-(s+6)%7}return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,n(o)):t(o)}}function i(e,t,r,n){for(var a,o,i=0,u=t.length,s=r.length;u>i;){if(n>=s)return-1;if(a=t.charCodeAt(i++),37===a){if(a=t.charAt(i++),o=Ue[a in te?t.charAt(i++):a],!o||(n=o(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}function u(e,t,r){var n=Te.exec(t.slice(r));return n?(e.p=Ye[n[0].toLowerCase()],r+n[0].length):-1}function q(e,t,r){var n=Je.exec(t.slice(r));return n?(e.w=ke[n[0].toLowerCase()],r+n[0].length):-1}function ee(e,t,r){var n=je.exec(t.slice(r));return n?(e.w=He[n[0].toLowerCase()],r+n[0].length):-1}function re(e,t,r){var n=we.exec(t.slice(r));return n?(e.m=Pe[n[0].toLowerCase()],r+n[0].length):-1}function ne(e,t,r){var n=ze.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1}function ae(e,t,r){return i(e,fe,t,r)}function oe(e,t,r){return i(e,be,t,r)}function ie(e,t,r){return i(e,Se,t,r)}function ue(e){return De[e.getDay()]}function se(e){return ve[e.getDay()]}function me(e){return Fe[e.getMonth()]}function de(e){return Ae[e.getMonth()]}function ce(e){return pe[+(e.getHours()>=12)]}function Me(e){return De[e.getUTCDay()]}function he(e){return ve[e.getUTCDay()]}function le(e){return Fe[e.getUTCMonth()]}function ge(e){return Ae[e.getUTCMonth()]}function ye(e){return pe[+(e.getUTCHours()>=12)]}var fe=e.dateTime,be=e.date,Se=e.time,pe=e.periods,ve=e.days,De=e.shortDays,Ae=e.months,Fe=e.shortMonths,Te=s(pe),Ye=m(pe),je=s(ve),He=m(ve),Je=s(De),ke=m(De),ze=s(Ae),Ce=m(Ae),we=s(Fe),Pe=m(Fe),Le={a:ue,A:se,b:me,B:de,c:null,d:F,e:F,H:T,I:Y,j:j,L:H,m:J,M:k,p:ce,S:z,U:C,w:w,W:P,x:null,X:null,y:L,Y:x,Z:U,"%":$},xe={a:Me,A:he,b:le,B:ge,c:null,d:X,e:X,H:N,I:O,j:B,L:W,m:Z,M:G,p:ye,S:E,U:I,w:K,W:Q,x:null,X:null,y:_,Y:R,Z:V,"%":$},Ue={a:q,A:ee,b:re,B:ne,c:ae,d:f,e:f,H:S,I:S,j:b,L:D,m:y,M:p,p:u,S:v,U:c,w:d,W:M,x:oe,X:ie,y:l,Y:h,Z:g,"%":A};return Le.x=t(be,Le),Le.X=t(Se,Le),Le.c=t(fe,Le),xe.x=t(be,xe),xe.X=t(Se,xe),xe.c=t(fe,xe),{format:function(e){var r=t(e+="",Le);return r.toString=function(){return e},r},parse:function(e){var t=o(e+="",r);return t.toString=function(){return e},t},utcFormat:function(e){var r=t(e+="",xe);return r.toString=function(){return e},r},utcParse:function(e){var t=o(e,n);return t.toString=function(){return e},t}}}function i(e,t,r){var n=0>e?"-":"",a=(n?-e:e)+"",o=a.length;return n+(r>o?new Array(r-o+1).join(t)+a:a)}function u(e){return e.replace(ae,"\\$&")}function s(e){return new RegExp("^(?:"+e.map(u).join("|")+")","i")}function m(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function d(e,t,r){var n=re.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function c(e,t,r){var n=re.exec(t.slice(r));return n?(e.U=+n[0],r+n[0].length):-1}function M(e,t,r){var n=re.exec(t.slice(r));return n?(e.W=+n[0],r+n[0].length):-1}function h(e,t,r){var n=re.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function l(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function g(e,t,r){var n=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function y(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function f(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function b(e,t,r){var n=re.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function S(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function p(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function v(e,t,r){var n=re.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function D(e,t,r){var n=re.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function A(e,t,r){var n=ne.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function F(e,t){return i(e.getDate(),t,2)}function T(e,t){return i(e.getHours(),t,2)}function Y(e,t){return i(e.getHours()%12||12,t,2)}function j(e,r){return i(1+t.timeDay.count(t.timeYear(e),e),r,3)}function H(e,t){return i(e.getMilliseconds(),t,3)}function J(e,t){return i(e.getMonth()+1,t,2)}function k(e,t){return i(e.getMinutes(),t,2)}function z(e,t){return i(e.getSeconds(),t,2)}function C(e,r){return i(t.timeSunday.count(t.timeYear(e),e),r,2)}function w(e){return e.getDay()}function P(e,r){return i(t.timeMonday.count(t.timeYear(e),e),r,2)}function L(e,t){return i(e.getFullYear()%100,t,2)}function x(e,t){return i(e.getFullYear()%1e4,t,4)}function U(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+i(t/60|0,"0",2)+i(t%60,"0",2)}function X(e,t){return i(e.getUTCDate(),t,2)}function N(e,t){return i(e.getUTCHours(),t,2)}function O(e,t){return i(e.getUTCHours()%12||12,t,2)}function B(e,r){return i(1+t.utcDay.count(t.utcYear(e),e),r,3)}function W(e,t){return i(e.getUTCMilliseconds(),t,3)}function Z(e,t){return i(e.getUTCMonth()+1,t,2)}function G(e,t){return i(e.getUTCMinutes(),t,2)}function E(e,t){return i(e.getUTCSeconds(),t,2)}function I(e,r){return i(t.utcSunday.count(t.utcYear(e),e),r,2)}function K(e){return e.getUTCDay()}function Q(e,r){return i(t.utcMonday.count(t.utcYear(e),e),r,2)}function _(e,t){return i(e.getUTCFullYear()%100,t,2)}function R(e,t){return i(e.getUTCFullYear()%1e4,t,4)}function V(){return"+0000"}function $(){return"%"}function q(e){return e.toISOString()}function ee(e){var t=new Date(e);return isNaN(t)?null:t}var te={"-":"",_:" ",0:"0"},re=/^\s*\d+/,ne=/^%/,ae=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,oe=o({dateTime:"%a %b %e %X %Y",date:"%m/%d/%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"]}),ie=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],shortDays:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],months:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortMonths:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."]}),ue=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),se=o({dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}),me=o({dateTime:"%a %b %e %X %Y",date:"%Y-%m-%d",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"]}),de=o({dateTime:"%a %e %b %X %Y",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"]}),ce=o({dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]}),Me=o({dateTime:"%A, %-d. %Bta %Y klo %X",date:"%-d.%-m.%Y",time:"%H:%M:%S",periods:["a.m.","p.m."],days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDays:["Su","Ma","Ti","Ke","To","Pe","La"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortMonths:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"]}),he=o({dateTime:"%a %e %b %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["",""],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim","lun","mar","mer","jeu","ven","sam"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["jan","fév","mar","avr","mai","jui","jul","aoû","sep","oct","nov","déc"]}),le=o({dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]}),ge=o({dateTime:"%A, %e ב%B %Y %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],shortDays:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],shortMonths:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"]}),ye=o({dateTime:"%Y. %B %-e., %A %X",date:"%Y. %m. %d.",time:"%H:%M:%S",periods:["de.","du."],days:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],shortDays:["V","H","K","Sze","Cs","P","Szo"],months:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortMonths:["jan.","feb.","már.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."]}),fe=o({dateTime:"%A %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]}),be=o({dateTime:"%Y %b %e %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["AM","PM"],days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],shortDays:["日","月","火","水","木","金","土"],months:["睦月","如月","弥生","卯月","皐月","水無月","文月","葉月","長月","神無月","霜月","師走"],shortMonths:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}),Se=o({dateTime:"%Y/%m/%d %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["오전","오후"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}),pe=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]}),ve=o({dateTime:"%a %e %B %Y %T",date:"%d-%m-%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"]}),De=o({dateTime:"%A, %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Niedz.","Pon.","Wt.","Śr.","Czw.","Pt.","Sob."],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Stycz.","Luty","Marz.","Kwie.","Maj","Czerw.","Lipc.","Sierp.","Wrz.","Paźdz.","Listop.","Grudz."]}),Ae=o({dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}),Fe=o({dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],shortDays:["вс","пн","вт","ср","чт","пт","сб"],months:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],shortMonths:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]}),Te=o({dateTime:"%A den %d %B %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["fm","em"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"]}),Ye=o({dateTime:"%a %b %e %X %Y",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]}),je="%Y-%m-%dT%H:%M:%S.%LZ",He=Date.prototype.toISOString?q:oe.utcFormat(je),Je=+new Date("2000-01-01T00:00:00.000Z")?ee:oe.utcParse(je),ke=oe.format,ze=oe.parse,Ce=oe.utcFormat,we=oe.utcParse,Pe="0.3.0";e.version=Pe,e.timeFormat=ke,e.timeParse=ze,e.utcFormat=Ce,e.utcParse=we,e.timeFormatLocale=o,e.timeFormatCaEs=ie,e.timeFormatDeCh=ue,e.timeFormatDeDe=se,e.timeFormatEnCa=me,e.timeFormatEnGb=de,e.timeFormatEnUs=oe,e.timeFormatEsEs=ce,e.timeFormatFiFi=Me,e.timeFormatFrCa=he,e.timeFormatFrFr=le,e.timeFormatHeIl=ge,e.timeFormatHuHu=ye,e.timeFormatItIt=fe,e.timeFormatJaJp=be,e.timeFormatKoKr=Se,e.timeFormatMkMk=pe,e.timeFormatNlNl=ve,e.timeFormatPlPl=De,e.timeFormatPtBr=Ae,e.timeFormatRuRu=Fe,e.timeFormatSvSe=Te,e.timeFormatZhCn=Ye,e.isoFormat=He,e.isoParse=Je});
import defaultLocale from "./src/locale/en-US";
export {default as locale} from "./src/locale";
export {default as localeCaEs} from "./src/locale/ca-ES";
export {default as localeDeCh} from "./src/locale/de-CH";
export {default as localeDeDe} from "./src/locale/de-DE";
export {default as localeEnCa} from "./src/locale/en-CA";
export {default as localeEnGb} from "./src/locale/en-GB";
export {default as localeEnUs} from "./src/locale/en-US";
export {default as localeEsEs} from "./src/locale/es-ES";
export {default as localeFiFi} from "./src/locale/fi-FI";
export {default as localeFrCa} from "./src/locale/fr-CA";
export {default as localeFrFr} from "./src/locale/fr-FR";
export {default as localeHeIl} from "./src/locale/he-IL";
export {default as localeHuHu} from "./src/locale/hu-HU";
export {default as localeItIt} from "./src/locale/it-IT";
export {default as localeJaJp} from "./src/locale/ja-JP";
export {default as localeKoKr} from "./src/locale/ko-KR";
export {default as localeMkMk} from "./src/locale/mk-MK";
export {default as localeNlNl} from "./src/locale/nl-NL";
export {default as localePlPl} from "./src/locale/pl-PL";
export {default as localePtBr} from "./src/locale/pt-BR";
export {default as localeRuRu} from "./src/locale/ru-RU";
export {default as localeSvSe} from "./src/locale/sv-SE";
export {default as localeZhCn} from "./src/locale/zh-CN";
export {default as timeFormatLocale} from "./src/locale";
export {default as timeFormatCaEs} from "./src/locale/ca-ES";
export {default as timeFormatDeCh} from "./src/locale/de-CH";
export {default as timeFormatDeDe} from "./src/locale/de-DE";
export {default as timeFormatEnCa} from "./src/locale/en-CA";
export {default as timeFormatEnGb} from "./src/locale/en-GB";
export {default as timeFormatEnUs} from "./src/locale/en-US";
export {default as timeFormatEsEs} from "./src/locale/es-ES";
export {default as timeFormatFiFi} from "./src/locale/fi-FI";
export {default as timeFormatFrCa} from "./src/locale/fr-CA";
export {default as timeFormatFrFr} from "./src/locale/fr-FR";
export {default as timeFormatHeIl} from "./src/locale/he-IL";
export {default as timeFormatHuHu} from "./src/locale/hu-HU";
export {default as timeFormatItIt} from "./src/locale/it-IT";
export {default as timeFormatJaJp} from "./src/locale/ja-JP";
export {default as timeFormatKoKr} from "./src/locale/ko-KR";
export {default as timeFormatMkMk} from "./src/locale/mk-MK";
export {default as timeFormatNlNl} from "./src/locale/nl-NL";
export {default as timeFormatPlPl} from "./src/locale/pl-PL";
export {default as timeFormatPtBr} from "./src/locale/pt-BR";
export {default as timeFormatRuRu} from "./src/locale/ru-RU";
export {default as timeFormatSvSe} from "./src/locale/sv-SE";
export {default as timeFormatZhCn} from "./src/locale/zh-CN";
export {default as isoFormat} from "./src/isoFormat";
export var format = defaultLocale.format;
export {default as isoParse} from "./src/isoParse";
export var timeFormat = defaultLocale.format;
export var timeParse = defaultLocale.parse;
export var utcFormat = defaultLocale.utcFormat;
export var utcParse = defaultLocale.utcParse;
{
"name": "d3-time-format",
"version": "0.2.1",
"version": "0.3.0",
"description": "A JavaScript time formatter and parser inspired by strftime and strptime.",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"d3-time": "~0.1.1"
"d3-time": "~0.2.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

# d3-time-format
This module provides a JavaScript implementation of the venerable [strptime](http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html) and [strftime](http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html) functions from the C standard library, and can be used to parse or format [dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) in a variety of locale-specific representations. To format a date, create a [*format* function](#_format) from a [format specifier](#locale_format) (a string with the desired format *directives*, indicated by `%`); then pass a date to the format function, which returns a string. For example, to convert the current date to a human-readable string:
This module provides a JavaScript implementation of the venerable [strptime](http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html) and [strftime](http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html) functions from the C standard library, and can be used to parse or format [dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) in a variety of locale-specific representations. To format a date, create a [format function](#locale_format) from a specifier (a string with the desired format *directives*, indicated by `%`); then pass a date to the format function, which returns a string. For example, to convert the current date to a human-readable string:
```js
var f = d3_time_format.format("%B %d, %Y");
f(new Date); // "June 30, 2015"
var formatTime = d3.timeFormat("%B %d, %Y");
formatTime(new Date); // "June 30, 2015"
```
Format functions also support parsing as [*format*.parse](#format_parse), so to convert a string back to a date:
Likewise, to convert a string back to a date, create a [parse function](#locale_parse):
```js
var f = d3_time_format.format("%B %d, %Y");
f.parse("June 30, 2015"); // Tue Jun 30 2015 00:00:00 GMT-0700 (PDT)
var parseTime = d3.timeParse("%B %d, %Y");
parseTime("June 30, 2015"); // Tue Jun 30 2015 00:00:00 GMT-0700 (PDT)
```

@@ -20,18 +20,18 @@

```js
var formatMillisecond = d3_time_format.format(".%L"),
formatSecond = d3_time_format.format(":%S"),
formatMinute = d3_time_format.format("%I:%M"),
formatHour = d3_time_format.format("%I %p"),
formatDay = d3_time_format.format("%a %d"),
formatWeek = d3_time_format.format("%b %d"),
formatMonth = d3_time_format.format("%B"),
formatYear = d3_time_format.format("%Y");
var formatMillisecond = d3.timeFormat(".%L"),
formatSecond = d3.timeFormat(":%S"),
formatMinute = d3.timeFormat("%I:%M"),
formatHour = d3.timeFormat("%I %p"),
formatDay = d3.timeFormat("%a %d"),
formatWeek = d3.timeFormat("%b %d"),
formatMonth = d3.timeFormat("%B"),
formatYear = d3.timeFormat("%Y");
function multiFormat(date) {
return (d3_time.second(date) < date ? formatMillisecond
: d3_time.minute(date) < date ? formatSecond
: d3_time.hour(date) < date ? formatMinute
: d3_time.day(date) < date ? formatHour
: d3_time.month(date) < date ? (d3_time.week(date) < date ? formatDay : formatWeek)
: d3_time.year(date) < date ? formatMonth
return (d3.timeSecond(date) < date ? formatMillisecond
: d3.timeMinute(date) < date ? formatSecond
: d3.timeHour(date) < date ? formatMinute
: d3.timeDay(date) < date ? formatHour
: d3.timeMonth(date) < date ? (d3.timeWeek(date) < date ? formatDay : formatWeek)
: d3.timeYear(date) < date ? formatMonth
: formatYear)(date);

@@ -41,3 +41,3 @@ }

This module is used by D3 [time scales](https://github.com/d3/d3-scales#time-scales) to generate human-readable ticks.
This module is used by D3 [time scales](https://github.com/d3/d3-scale#time-scales) to generate human-readable ticks.

@@ -49,4 +49,4 @@ ## Installing

```html
<script src="https://d3js.org/d3-time.v0.1.min.js"></script>
<script src="https://d3js.org/d3-time-format.v0.2.min.js"></script>
<script src="https://d3js.org/d3-time.v0.2.min.js"></script>
<script src="https://d3js.org/d3-time-format.v0.3.min.js"></script>
```

@@ -58,16 +58,28 @@

<a name="format" href="#format">#</a> d3_time_format.<b>format</b>(<i>specifier</i>)
<a name="timeFormat" href="#timeFormat">#</a> d3.<b>timeFormat</b>(<i>specifier</i>)
An alias for [*locale*.format](#locale_format) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales), or use [locale](#locale) to define a new locale.
An alias for [*locale*.format](#locale_format) on the [U.S. English locale](#timeFormatEnUs). See the other [locales](#locales), or use [timeFormatLocale](#timeFormatLocale) to define a new locale.
<a name="utcFormat" href="#utcFormat">#</a> d3_time_format.<b>utcFormat</b>(<i>specifier</i>)
<a name="timeParse" href="#timeParse">#</a> d3.<b>timeParse</b>(<i>specifier</i>)
An alias for [*locale*.utcFormat](#locale_utcFormat) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales), or use [locale](#locale) to define a new locale.
An alias for [*locale*.parse](#locale_parse) on the [U.S. English locale](#timeFormatEnUs). See the other [locales](#locales), or use [timeFormatLocale](#timeFormatLocale) to define a new locale.
<a name="isoFormat" href="#isoFormat">#</a> d3_time_format.<b>isoFormat</b>
<a name="utcFormat" href="#utcFormat">#</a> d3.<b>utcFormat</b>(<i>specifier</i>)
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time [*format* function](#_format). Where available, this method will use [Date.toISOString](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString) to format and the [Date constructor](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date) to parse strings. If you depend on strict validation of the input format according to ISO 8601, you should construct a [UTC format](#utcFormat):
An alias for [*locale*.utcFormat](#locale_utcFormat) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales), or use [timeFormatLocale](#timeFormatLocale) to define a new locale.
<a name="utcParse" href="#utcParse">#</a> d3.<b>utcParse</b>(<i>specifier</i>)
An alias for [*locale*.utcParse](#locale_utcParse) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales), or use [timeFormatLocale](#timeFormatLocale) to define a new locale.
<a name="isoFormat" href="#isoFormat">#</a> d3.<b>isoFormat</b>
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time *format* function. Where available, this method will use [Date.toISOString](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString) to format.
<a name="isoParse" href="#isoParse">#</a> d3.<b>isoParse</b>
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time *parse* function. Where available, this method will use the [Date constructor](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date) to parse strings. If you depend on strict validation of the input format according to ISO 8601, you should construct a [UTC parser function](#utcParse):
```js
var isoFormat = d3_time_format.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
var strictIsoParse = d3.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
```

@@ -77,3 +89,3 @@

Returns a new [*format* function](#_format) for the given string *specifier*. The specifier string may contain the following directives:
Returns a new format function for the given string *specifier*. The specifier string may contain the following directives:

@@ -115,13 +127,7 @@ * `%a` - abbreviated weekday name.*

<a name="locale_utcFormat" href="#locale_utcFormat">#</a> <i>locale</i>.<b>utcFormat</b>(<i>specifier</i>)
The returned function formats a specified *[date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date)*, returning the corresponding string.
Equivalent to [*locale*.format](#locale_format), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time.
<a name="_format" href="#_format">#</a> <i>format</i>(<i>date</i>)
Formats the specified *[date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date)*, returning the corresponding string.
```javascript
var formatMonth = d3_time_format.format("%B"),
formatDay = d3_time_format.format("%A"),
```js
var formatMonth = d3.timeFormat("%B"),
formatDay = d3.timeFormat("%A"),
date = new Date(2014, 4, 1); // Thu May 01 2014 00:00:00 GMT-0700 (PDT)

@@ -133,19 +139,21 @@

<a name="format_parse" href="#format_parse">#</a> <i>format</i>.<b>parse</b>(<i>string</i>)
<a name="locale_parse" href="#locale_parse">#</a> <i>locale</i>.<b>parse</b>(<i>specifier</i>)
Parses the specified *string*, returning the corresponding [date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) or null if the string could not be parsed according to this format’s specifier.
Returns a new parser function for the given string *specifier*. The specifier string may contain the same directives as [*locale*.format](#locale_format). The `%d` and `%e` directives are considered equivalent for parsing.
Parsing is strict: if the specified <i>string</i> does not exactly match the associated specifier, this method returns null. For example, if the associated specifier is `%Y-%m-%dT%H:%M:%SZ`, then the string `"2011-07-01T19:15:28Z"` will be parsed as expected, but `"2011-07-01T19:15:28"`, `"2011-07-01 19:15:28"` and `"2011-07-01"` will return null. (Note that the literal `Z` here is different from the time zone offset directive `%Z`.) If a more flexible parser is desired, try multiple formats sequentially until one returns non-null.
The returned function parses a specified *string*, returning the corresponding [date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) or null if the string could not be parsed according to this format’s specifier. Parsing is strict: if the specified <i>string</i> does not exactly match the associated specifier, this method returns null. For example, if the associated specifier is `%Y-%m-%dT%H:%M:%SZ`, then the string `"2011-07-01T19:15:28Z"` will be parsed as expected, but `"2011-07-01T19:15:28"`, `"2011-07-01 19:15:28"` and `"2011-07-01"` will return null. (Note that the literal `Z` here is different from the time zone offset directive `%Z`.) If a more flexible parser is desired, try multiple formats sequentially until one returns non-null.
The `%d` and `%e` directives are considered equivalent for parsing.
<a name="locale_utcFormat" href="#locale_utcFormat">#</a> <i>locale</i>.<b>utcFormat</b>(<i>specifier</i>)
<a name="format_toString" href="#format_toString">#</a> <i>format</i>.<b>toString</b>()
Equivalent to [*locale*.format](#locale_format), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time.
Returns this format’s specifier.
<a name="locale_utcParse" href="#locale_utcParse">#</a> <i>locale</i>.<b>utcParse</b>(<i>specifier</i>)
Equivalent to [*locale*.parse](#locale_parse), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time.
### Locales
<a name="locale" href="#locale">#</a> d3_time_format.<b>locale</b>(<i>definition</i>)
<a name="timeFormatLocale" href="#timeFormatLocale">#</a> d3.<b>timeFormatLocale</b>(<i>definition</i>)
Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format) and [*locale*.utcFormat](#locale_utcFormat) methods. The *definition* must include the following properties:
Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format), [*locale*.parse](#locale_parse), [*locale*.utcFormat](#locale_utcFormat), [*locale*.utcParse](#locale_utcParse) methods. The *definition* must include the following properties:

@@ -161,88 +169,88 @@ * `dateTime` - the date and time (`%c`) format specifier (<i>e.g.</i>, `"%a %b %e %X %Y"`).

<a name="localeCaEs" href="#localeCaEs">#</a> d3_time_format.<b>localeCaEs</b>
<a name="timeFormatCaEs" href="#timeFormatCaEs">#</a> d3.<b>timeFormatCaEs</b>
[Catalan (Spain)](https://github.com/d3/d3-time-format/tree/master/src/locale/ca-ES.js)
<a name="localeDeCh" href="#localeDeCh">#</a> d3_time_format.<b>localeDeCh</b>
<a name="timeFormatDeCh" href="#timeFormatDeCh">#</a> d3.<b>timeFormatDeCh</b>
[German (Switzerland)](https://github.com/d3/d3-time-format/tree/master/src/locale/de-CH.js)
<a name="localeDeDe" href="#localeDeDe">#</a> d3_time_format.<b>localeDeDe</b>
<a name="timeFormatDeDe" href="#timeFormatDeDe">#</a> d3.<b>timeFormatDeDe</b>
[German (Germany)](https://github.com/d3/d3-time-format/tree/master/src/locale/de-DE.js)
<a name="localeEnCa" href="#localeEnCa">#</a> d3_time_format.<b>localeEnCa</b>
<a name="timeFormatEnCa" href="#timeFormatEnCa">#</a> d3.<b>timeFormatEnCa</b>
[English (Canada)](https://github.com/d3/d3-time-format/tree/master/src/locale/en-CA.js)
<a name="localeEnGb" href="#localeEnGb">#</a> d3_time_format.<b>localeEnGb</b>
<a name="timeFormatEnGb" href="#timeFormatEnGb">#</a> d3.<b>timeFormatEnGb</b>
[English (United Kingdom)](https://github.com/d3/d3-time-format/tree/master/src/locale/en-GB.js)
<a name="localeEnUs" href="#localeEnUs">#</a> d3_time_format.<b>localeEnUs</b>
<a name="timeFormatEnUs" href="#timeFormatEnUs">#</a> d3.<b>timeFormatEnUs</b>
[English (United States)](https://github.com/d3/d3-time-format/tree/master/src/locale/en-US.js)
<a name="localeEsEs" href="#localeEsEs">#</a> d3_time_format.<b>localeEsEs</b>
<a name="timeFormatEsEs" href="#timeFormatEsEs">#</a> d3.<b>timeFormatEsEs</b>
[Spanish (Spain)](https://github.com/d3/d3-time-format/tree/master/src/locale/es-ES.js)
<a name="localeFiFi" href="#localeFiFi">#</a> d3_time_format.<b>localeFiFi</b>
<a name="timeFormatFiFi" href="#timeFormatFiFi">#</a> d3.<b>timeFormatFiFi</b>
[Finnish (Finland)](https://github.com/d3/d3-time-format/tree/master/src/locale/fi-FI.js)
<a name="localeFrCa" href="#localeFrCa">#</a> d3_time_format.<b>localeFrCa</b>
<a name="timeFormatFrCa" href="#timeFormatFrCa">#</a> d3.<b>timeFormatFrCa</b>
[French (Canada)](https://github.com/d3/d3-time-format/tree/master/src/locale/fr-CA.js)
<a name="localeFrFr" href="#localeFrFr">#</a> d3_time_format.<b>localeFrFr</b>
<a name="timeFormatFrFr" href="#timeFormatFrFr">#</a> d3.<b>timeFormatFrFr</b>
[French (France)](https://github.com/d3/d3-time-format/tree/master/src/locale/fr-FR.js)
<a name="localeHeIl" href="#localeHeIl">#</a> d3_time_format.<b>localeHeIl</b>
<a name="timeFormatHeIl" href="#timeFormatHeIl">#</a> d3.<b>timeFormatHeIl</b>
[Hebrew (Israel)](https://github.com/d3/d3-time-format/tree/master/src/locale/he-IL.js)
<a name="localeHuHu" href="#localeHuHu">#</a> d3_time_format.<b>localeHuHu</b>
<a name="timeFormatHuHu" href="#timeFormatHuHu">#</a> d3.<b>timeFormatHuHu</b>
[Hungarian (Hungary)](https://github.com/d3/d3-time-format/tree/master/src/locale/hu-HU.js)
<a name="localeItIt" href="#localeItIt">#</a> d3_time_format.<b>localeItIt</b>
<a name="timeFormatItIt" href="#timeFormatItIt">#</a> d3.<b>timeFormatItIt</b>
[Italian (Italy)](https://github.com/d3/d3-time-format/tree/master/src/locale/it-IT.js)
<a name="localeJaJp" href="#localeJaJp">#</a> d3_time_format.<b>localeJaJp</b>
<a name="timeFormatJaJp" href="#timeFormatJaJp">#</a> d3.<b>timeFormatJaJp</b>
[Japanese (Japan)](https://github.com/d3/d3-time-format/tree/master/src/locale/ja-JP.js)
<a name="localeKoKr" href="#localeKoKr">#</a> d3_time_format.<b>localeKoKr</b>
<a name="timeFormatKoKr" href="#timeFormatKoKr">#</a> d3.<b>timeFormatKoKr</b>
[Korean (South Korea)](https://github.com/d3/d3-time-format/tree/master/src/locale/ko-KR.js)
<a name="localeMkMk" href="#localeMkMk">#</a> d3_time_format.<b>localeMkMk</b>
<a name="timeFormatMkMk" href="#timeFormatMkMk">#</a> d3.<b>timeFormatMkMk</b>
[Macedonian (Macedonia)](https://github.com/d3/d3-time-format/tree/master/src/locale/mk-MK.js)
<a name="localeNlNl" href="#localeNlNl">#</a> d3_time_format.<b>localeNlNl</b>
<a name="timeFormatNlNl" href="#timeFormatNlNl">#</a> d3.<b>timeFormatNlNl</b>
[Dutch (Netherlands)](https://github.com/d3/d3-time-format/tree/master/src/locale/nl-NL.js)
<a name="localePlPl" href="#localePlPl">#</a> d3_time_format.<b>localePlPl</b>
<a name="timeFormatPlPl" href="#timeFormatPlPl">#</a> d3.<b>timeFormatPlPl</b>
[Polish (Poland)](https://github.com/d3/d3-time-format/tree/master/src/locale/pl-PL.js)
<a name="localePtBr" href="#localePtBr">#</a> d3_time_format.<b>localePtBr</b>
<a name="timeFormatPtBr" href="#timeFormatPtBr">#</a> d3.<b>timeFormatPtBr</b>
[Portuguese (Brazil)](https://github.com/d3/d3-time-format/tree/master/src/locale/pt-BR.js)
<a name="localeRuRu" href="#localeRuRu">#</a> d3_time_format.<b>localeRuRu</b>
<a name="timeFormatRuRu" href="#timeFormatRuRu">#</a> d3.<b>timeFormatRuRu</b>
[Russian (Russia)](https://github.com/d3/d3-time-format/tree/master/src/locale/ru-RU.js)
<a name="localeSvSe" href="#localeSvSe">#</a> d3_time_format.<b>localeSvSe</b>
<a name="timeFormatSvSe" href="#timeFormatSvSe">#</a> d3.<b>timeFormatSvSe</b>
[Swedish (Sweden)](https://github.com/d3/d3-time-format/tree/master/src/locale/sv-SE.js)
<a name="localeZhCn" href="#localeZhCn">#</a> d3_time_format.<b>localeZhCn</b>
<a name="timeFormatZhCn" href="#timeFormatZhCn">#</a> d3.<b>timeFormatZhCn</b>
[Chinese (China)](https://github.com/d3/d3-time-format/tree/master/src/locale/zh-CN.js)
import locale from "./locale/en-US";
var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
export var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";

@@ -9,12 +9,3 @@ function formatIsoNative(date) {

formatIsoNative.parse = function(string) {
var date = new Date(string);
return isNaN(date) ? null : date;
};
formatIsoNative.toString = function() {
return isoSpecifier;
};
var formatIso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z")
var formatIso = Date.prototype.toISOString
? formatIsoNative

@@ -21,0 +12,0 @@ : locale.utcFormat(isoSpecifier);

@@ -1,2 +0,2 @@

import {day, sunday, monday, year, utcDay, utcSunday, utcMonday, utcYear} from "d3-time";
import {timeDay, timeSunday, timeMonday, timeYear, utcDay, utcSunday, utcMonday, utcYear} from "d3-time";

@@ -295,11 +295,19 @@ function localDate(d) {

var f = newFormat(specifier += "", formats);
f.parse = newParse(specifier, localDate);
f.toString = function() { return specifier; };
return f;
},
parse: function(specifier) {
var p = newParse(specifier += "", localDate);
p.toString = function() { return specifier; };
return p;
},
utcFormat: function(specifier) {
var f = newFormat(specifier += "", utcFormats);
f.parse = newParse(specifier, utcDate);
f.toString = function() { return specifier; };
return f;
},
utcParse: function(specifier) {
var p = newParse(specifier, utcDate);
p.toString = function() { return specifier; };
return p;
}

@@ -418,3 +426,3 @@ };

function formatDayOfYear(d, p) {
return pad(1 + day.count(year(d), d), p, 3);
return pad(1 + timeDay.count(timeYear(d), d), p, 3);
}

@@ -439,3 +447,3 @@

function formatWeekNumberSunday(d, p) {
return pad(sunday.count(year(d), d), p, 2);
return pad(timeSunday.count(timeYear(d), d), p, 2);
}

@@ -448,3 +456,3 @@

function formatWeekNumberMonday(d, p) {
return pad(monday.count(year(d), d), p, 2);
return pad(timeMonday.count(timeYear(d), d), p, 2);
}

@@ -451,0 +459,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc