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.3.0 to 0.3.1

.eslintrc

2

build/bundle.js

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

var version = "0.3.0"; export * from "../index"; export {version};
var version = "0.3.1"; export * from "../index"; export {version};
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-time')) :
typeof define === 'function' && define.amd ? define('d3-time-format', ['exports', 'd3-time'], factory) :
factory((global.d3_time_format = {}),global.d3_time);
typeof define === 'function' && define.amd ? define(['exports', 'd3-time'], factory) :
(factory((global.d3_time_format = {}),global.d3_time));
}(this, function (exports,d3Time) { 'use strict';

@@ -318,3 +318,3 @@

};
};
}

@@ -801,3 +801,3 @@ var pads = {"-": "", "_": " ", "0": "0"};

var version = "0.3.0";
var version = "0.3.1";

@@ -804,0 +804,0 @@ exports.version = version;

@@ -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,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});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-time")):"function"==typeof define&&define.amd?define(["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.1";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});
{
"name": "d3-time-format",
"version": "0.3.0",
"version": "0.3.1",
"description": "A JavaScript time formatter and parser inspired by strftime and strptime.",

@@ -25,5 +25,6 @@ "keywords": [

"scripts": {
"pretest": "mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -g d3-time:d3_time -u d3-time-format -n d3_time_format -o build/d3-time-format.js -- build/bundle.js",
"test": "TZ=America/Los_Angeles faucet `find test -name '*-test.js'`",
"prepublish": "npm run test && uglifyjs build/d3-time-format.js -c -m -o build/d3-time-format.min.js && rm -f build/d3-time-format.zip && zip -j build/d3-time-format.zip -- LICENSE README.md build/d3-time-format.js build/d3-time-format.min.js"
"pretest": "mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -g d3-time:d3_time -n d3_time_format -o build/d3-time-format.js -- build/bundle.js",
"test": "TZ=America/Los_Angeles faucet `find test -name '*-test.js'` && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-time-format.js -c -m -o build/d3-time-format.min.js && rm -f build/d3-time-format.zip && zip -j build/d3-time-format.zip -- LICENSE README.md build/d3-time-format.js build/d3-time-format.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git tag -am \"Release $VERSION.\" v${VERSION} && git push --tags && cp build/d3-time-format.js ../d3.github.com/d3-time-format.v0.3.js && cp build/d3-time-format.min.js ../d3.github.com/d3-time-format.v0.3.min.js && cd ../d3.github.com && git add d3-time-format.v0.3.js d3-time-format.v0.3.min.js && git commit -m \"d3-time-format ${VERSION}\" && git push"
},

@@ -35,3 +36,3 @@ "dependencies": {

"faucet": "0.0",
"rollup": "0.20.5",
"rollup": "0.25",
"tape": "4",

@@ -38,0 +39,0 @@ "uglify-js": "2"

# 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](#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:
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 [formatter](#locale_format) from a specifier (a string with the desired format *directives*, indicated by `%`); then pass a date to the formatter, which returns a string. For example, to convert the current date to a human-readable string:

@@ -10,3 +10,3 @@ ```js

Likewise, to convert a string back to a date, create a [parse function](#locale_parse):
Likewise, to convert a string back to a date, create a [parser](#locale_parse):

@@ -58,23 +58,23 @@ ```js

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.
An alias for [*locale*.format](#locale_format) on the [U.S. English locale](#timeFormatEnUs). See the other [locales](#locales).
<a name="timeParse" href="#timeParse">#</a> d3.<b>timeParse</b>(<i>specifier</i>)
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.
An alias for [*locale*.parse](#locale_parse) on the [U.S. English locale](#timeFormatEnUs). See the other [locales](#locales).
<a name="utcFormat" href="#utcFormat">#</a> d3.<b>utcFormat</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 [timeFormatLocale](#timeFormatLocale) to define a new locale.
An alias for [*locale*.utcFormat](#locale_utcFormat) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales).
<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.
An alias for [*locale*.utcParse](#locale_utcParse) on the [U.S. English locale](#localeEnUs). See the other [locales](#locales).
<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.
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time formatter. 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):
The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time parser. 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):

@@ -87,3 +87,3 @@ ```js

Returns a new format function for the given string *specifier*. The specifier string may contain the following directives:
Returns a new formatter for the given string *specifier*. The specifier string may contain the following directives:

@@ -138,3 +138,3 @@ * `%a` - abbreviated weekday name.*

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.
Returns a new parser 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.

@@ -141,0 +141,0 @@ 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.

@@ -314,3 +314,3 @@ import {timeDay, timeSunday, timeMonday, timeYear, utcDay, utcSunday, utcMonday, utcYear} from "d3-time";

};
};
}

@@ -317,0 +317,0 @@ var pads = {"-": "", "_": " ", "0": "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