You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
5.5 KiB
2 lines
5.5 KiB
5 years ago
|
// https://d3js.org/d3-time/ Version 1.0.8. Copyright 2017 Mike Bostock.
|
||
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})}(this,function(e){"use strict";function t(e,n,u,i){function a(t){return e(t=new Date(+t)),t}return a.floor=a,a.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=function(e,t){return n(e=new Date(+e),null==t?1:Math.floor(t)),e},a.range=function(t,u,r){var o,i=[];if(t=a.ceil(t),r=null==r?1:Math.floor(r),!(t<u&&r>0))return i;do{i.push(o=new Date(+t)),n(t,r),e(t)}while(o<t&&t<u);return i},a.filter=function(u){return t(function(t){if(t>=t)for(;e(t),!u(t);)t.setTime(t-1)},function(e,t){if(e>=e)if(t<0)for(;++t<=0;)for(;n(e,-1),!u(e););else for(;--t>=0;)for(;n(e,1),!u(e););})},u&&(a.count=function(t,n){return r.setTime(+t),o.setTime(+n),e(r),e(o),Math.floor(u(r,o))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(i?function(t){return i(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}function n(e){return t(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*c)/s})}function u(e){return t(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/s})}var r=new Date,o=new Date,i=t(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?t(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):i:null};var a=i.range,c=6e4,s=6048e5,f=t(function(e){e.setTime(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),l=f.range,g=t(function(e){e.setTime(Math.floor(e/c)*c)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getMinutes()}),T=g.range,d=t(function(e){var t=e.getTimezoneOffset()*c%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),m=d.range,M=t(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*c)/864e5},function(e){return e.getDate()-1}),y=M.range,h=n(0),C=n(1),U=n(2),F=n(3),D=n(4),Y=n(5),H=n(6),S=h.range,v=C.range,p=U.range,W=F.range,w=D.range,O=Y.range,z=H.range,k=t(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),x=k.range,b=t(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});b.every=function(e){return isFinite(e=Math.floor(e))&&e>0?t(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var j=b.range,_=t(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*c)},function(e,t){return(t-e)/c},function(e){return e.getUTCMinutes()}),I=_.range,P=t(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),q=P.range,A=t(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),B=A.range,E=u(0),G=u(1),J=u(2),K=u(3),L=u(4),N=u(5),Q=u(6),R=E.range,V=G.range,X=J.range,Z=K.range,$=L.range,ee=N.range,te=Q.range,ne=t(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUT
|