/usr/lib/nodejs/d3-time/build/d3-time.js is in node-d3-time 1.0.7-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["d3"] = factory();
else
root["d3"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = newInterval;
var t0 = new Date(),
t1 = new Date();
function newInterval(floori, offseti, count, field) {
function interval(date) {
return floori(date = new Date(+date)), date;
}
interval.floor = interval;
interval.ceil = function (date) {
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
};
interval.round = function (date) {
var d0 = interval(date),
d1 = interval.ceil(date);
return date - d0 < d1 - date ? d0 : d1;
};
interval.offset = function (date, step) {
return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
};
interval.range = function (start, stop, step) {
var range = [];
start = interval.ceil(start);
step = step == null ? 1 : Math.floor(step);
if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
do {
range.push(new Date(+start));
} while ((offseti(start, step), floori(start), start < stop));
return range;
};
interval.filter = function (test) {
return newInterval(function (date) {
if (date >= date) while (floori(date), !test(date)) {
date.setTime(date - 1);
}
}, function (date, step) {
if (date >= date) {
if (step < 0) while (++step <= 0) {
while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
} else while (--step >= 0) {
while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
}
}
});
};
if (count) {
interval.count = function (start, end) {
t0.setTime(+start), t1.setTime(+end);
floori(t0), floori(t1);
return Math.floor(count(t0, t1));
};
interval.every = function (step) {
step = Math.floor(step);
return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {
return field(d) % step === 0;
} : function (d) {
return interval.count(0, d) % step === 0;
});
};
}
return interval;
}
module.exports = exports["default"];
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var durationSecond = exports.durationSecond = 1e3;
var durationMinute = exports.durationMinute = 6e4;
var durationHour = exports.durationHour = 36e5;
var durationDay = exports.durationDay = 864e5;
var durationWeek = exports.durationWeek = 6048e5;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _interval = __webpack_require__(0);
Object.defineProperty(exports, "timeInterval", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_interval).default;
}
});
var _millisecond = __webpack_require__(3);
Object.defineProperty(exports, "timeMillisecond", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_millisecond).default;
}
});
Object.defineProperty(exports, "timeMilliseconds", {
enumerable: true,
get: function get() {
return _millisecond.milliseconds;
}
});
Object.defineProperty(exports, "utcMillisecond", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_millisecond).default;
}
});
Object.defineProperty(exports, "utcMilliseconds", {
enumerable: true,
get: function get() {
return _millisecond.milliseconds;
}
});
var _second = __webpack_require__(4);
Object.defineProperty(exports, "timeSecond", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_second).default;
}
});
Object.defineProperty(exports, "timeSeconds", {
enumerable: true,
get: function get() {
return _second.seconds;
}
});
Object.defineProperty(exports, "utcSecond", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_second).default;
}
});
Object.defineProperty(exports, "utcSeconds", {
enumerable: true,
get: function get() {
return _second.seconds;
}
});
var _minute = __webpack_require__(5);
Object.defineProperty(exports, "timeMinute", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_minute).default;
}
});
Object.defineProperty(exports, "timeMinutes", {
enumerable: true,
get: function get() {
return _minute.minutes;
}
});
var _hour = __webpack_require__(6);
Object.defineProperty(exports, "timeHour", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_hour).default;
}
});
Object.defineProperty(exports, "timeHours", {
enumerable: true,
get: function get() {
return _hour.hours;
}
});
var _day = __webpack_require__(7);
Object.defineProperty(exports, "timeDay", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_day).default;
}
});
Object.defineProperty(exports, "timeDays", {
enumerable: true,
get: function get() {
return _day.days;
}
});
var _week = __webpack_require__(8);
Object.defineProperty(exports, "timeWeek", {
enumerable: true,
get: function get() {
return _week.sunday;
}
});
Object.defineProperty(exports, "timeWeeks", {
enumerable: true,
get: function get() {
return _week.sundays;
}
});
Object.defineProperty(exports, "timeSunday", {
enumerable: true,
get: function get() {
return _week.sunday;
}
});
Object.defineProperty(exports, "timeSundays", {
enumerable: true,
get: function get() {
return _week.sundays;
}
});
Object.defineProperty(exports, "timeMonday", {
enumerable: true,
get: function get() {
return _week.monday;
}
});
Object.defineProperty(exports, "timeMondays", {
enumerable: true,
get: function get() {
return _week.mondays;
}
});
Object.defineProperty(exports, "timeTuesday", {
enumerable: true,
get: function get() {
return _week.tuesday;
}
});
Object.defineProperty(exports, "timeTuesdays", {
enumerable: true,
get: function get() {
return _week.tuesdays;
}
});
Object.defineProperty(exports, "timeWednesday", {
enumerable: true,
get: function get() {
return _week.wednesday;
}
});
Object.defineProperty(exports, "timeWednesdays", {
enumerable: true,
get: function get() {
return _week.wednesdays;
}
});
Object.defineProperty(exports, "timeThursday", {
enumerable: true,
get: function get() {
return _week.thursday;
}
});
Object.defineProperty(exports, "timeThursdays", {
enumerable: true,
get: function get() {
return _week.thursdays;
}
});
Object.defineProperty(exports, "timeFriday", {
enumerable: true,
get: function get() {
return _week.friday;
}
});
Object.defineProperty(exports, "timeFridays", {
enumerable: true,
get: function get() {
return _week.fridays;
}
});
Object.defineProperty(exports, "timeSaturday", {
enumerable: true,
get: function get() {
return _week.saturday;
}
});
Object.defineProperty(exports, "timeSaturdays", {
enumerable: true,
get: function get() {
return _week.saturdays;
}
});
var _month = __webpack_require__(9);
Object.defineProperty(exports, "timeMonth", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_month).default;
}
});
Object.defineProperty(exports, "timeMonths", {
enumerable: true,
get: function get() {
return _month.months;
}
});
var _year = __webpack_require__(10);
Object.defineProperty(exports, "timeYear", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_year).default;
}
});
Object.defineProperty(exports, "timeYears", {
enumerable: true,
get: function get() {
return _year.years;
}
});
var _utcMinute = __webpack_require__(11);
Object.defineProperty(exports, "utcMinute", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_utcMinute).default;
}
});
Object.defineProperty(exports, "utcMinutes", {
enumerable: true,
get: function get() {
return _utcMinute.utcMinutes;
}
});
var _utcHour = __webpack_require__(12);
Object.defineProperty(exports, "utcHour", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_utcHour).default;
}
});
Object.defineProperty(exports, "utcHours", {
enumerable: true,
get: function get() {
return _utcHour.utcHours;
}
});
var _utcDay = __webpack_require__(13);
Object.defineProperty(exports, "utcDay", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_utcDay).default;
}
});
Object.defineProperty(exports, "utcDays", {
enumerable: true,
get: function get() {
return _utcDay.utcDays;
}
});
var _utcWeek = __webpack_require__(14);
Object.defineProperty(exports, "utcWeek", {
enumerable: true,
get: function get() {
return _utcWeek.utcSunday;
}
});
Object.defineProperty(exports, "utcWeeks", {
enumerable: true,
get: function get() {
return _utcWeek.utcSundays;
}
});
Object.defineProperty(exports, "utcSunday", {
enumerable: true,
get: function get() {
return _utcWeek.utcSunday;
}
});
Object.defineProperty(exports, "utcSundays", {
enumerable: true,
get: function get() {
return _utcWeek.utcSundays;
}
});
Object.defineProperty(exports, "utcMonday", {
enumerable: true,
get: function get() {
return _utcWeek.utcMonday;
}
});
Object.defineProperty(exports, "utcMondays", {
enumerable: true,
get: function get() {
return _utcWeek.utcMondays;
}
});
Object.defineProperty(exports, "utcTuesday", {
enumerable: true,
get: function get() {
return _utcWeek.utcTuesday;
}
});
Object.defineProperty(exports, "utcTuesdays", {
enumerable: true,
get: function get() {
return _utcWeek.utcTuesdays;
}
});
Object.defineProperty(exports, "utcWednesday", {
enumerable: true,
get: function get() {
return _utcWeek.utcWednesday;
}
});
Object.defineProperty(exports, "utcWednesdays", {
enumerable: true,
get: function get() {
return _utcWeek.utcWednesdays;
}
});
Object.defineProperty(exports, "utcThursday", {
enumerable: true,
get: function get() {
return _utcWeek.utcThursday;
}
});
Object.defineProperty(exports, "utcThursdays", {
enumerable: true,
get: function get() {
return _utcWeek.utcThursdays;
}
});
Object.defineProperty(exports, "utcFriday", {
enumerable: true,
get: function get() {
return _utcWeek.utcFriday;
}
});
Object.defineProperty(exports, "utcFridays", {
enumerable: true,
get: function get() {
return _utcWeek.utcFridays;
}
});
Object.defineProperty(exports, "utcSaturday", {
enumerable: true,
get: function get() {
return _utcWeek.utcSaturday;
}
});
Object.defineProperty(exports, "utcSaturdays", {
enumerable: true,
get: function get() {
return _utcWeek.utcSaturdays;
}
});
var _utcMonth = __webpack_require__(15);
Object.defineProperty(exports, "utcMonth", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_utcMonth).default;
}
});
Object.defineProperty(exports, "utcMonths", {
enumerable: true,
get: function get() {
return _utcMonth.utcMonths;
}
});
var _utcYear = __webpack_require__(16);
Object.defineProperty(exports, "utcYear", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_utcYear).default;
}
});
Object.defineProperty(exports, "utcYears", {
enumerable: true,
get: function get() {
return _utcYear.utcYears;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.milliseconds = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var millisecond = (0, _interval2.default)(function () {
// noop
}, function (date, step) {
date.setTime(+date + step);
}, function (start, end) {
return end - start;
});
// An optimized implementation for this simple case.
millisecond.every = function (k) {
k = Math.floor(k);
if (!isFinite(k) || !(k > 0)) return null;
if (!(k > 1)) return millisecond;
return (0, _interval2.default)(function (date) {
date.setTime(Math.floor(date / k) * k);
}, function (date, step) {
date.setTime(+date + step * k);
}, function (start, end) {
return (end - start) / k;
});
};
exports.default = millisecond;
var milliseconds = exports.milliseconds = millisecond.range;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.seconds = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var second = (0, _interval2.default)(function (date) {
date.setTime(Math.floor(date / _duration.durationSecond) * _duration.durationSecond);
}, function (date, step) {
date.setTime(+date + step * _duration.durationSecond);
}, function (start, end) {
return (end - start) / _duration.durationSecond;
}, function (date) {
return date.getUTCSeconds();
});
exports.default = second;
var seconds = exports.seconds = second.range;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.minutes = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var minute = (0, _interval2.default)(function (date) {
date.setTime(Math.floor(date / _duration.durationMinute) * _duration.durationMinute);
}, function (date, step) {
date.setTime(+date + step * _duration.durationMinute);
}, function (start, end) {
return (end - start) / _duration.durationMinute;
}, function (date) {
return date.getMinutes();
});
exports.default = minute;
var minutes = exports.minutes = minute.range;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hours = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var hour = (0, _interval2.default)(function (date) {
var offset = date.getTimezoneOffset() * _duration.durationMinute % _duration.durationHour;
if (offset < 0) offset += _duration.durationHour;
date.setTime(Math.floor((+date - offset) / _duration.durationHour) * _duration.durationHour + offset);
}, function (date, step) {
date.setTime(+date + step * _duration.durationHour);
}, function (start, end) {
return (end - start) / _duration.durationHour;
}, function (date) {
return date.getHours();
});
exports.default = hour;
var hours = exports.hours = hour.range;
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.days = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var day = (0, _interval2.default)(function (date) {
date.setHours(0, 0, 0, 0);
}, function (date, step) {
date.setDate(date.getDate() + step);
}, function (start, end) {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration.durationMinute) / _duration.durationDay;
}, function (date) {
return date.getDate() - 1;
});
exports.default = day;
var days = exports.days = day.range;
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.saturdays = exports.fridays = exports.thursdays = exports.wednesdays = exports.tuesdays = exports.mondays = exports.sundays = exports.saturday = exports.friday = exports.thursday = exports.wednesday = exports.tuesday = exports.monday = exports.sunday = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function weekday(i) {
return (0, _interval2.default)(function (date) {
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
date.setHours(0, 0, 0, 0);
}, function (date, step) {
date.setDate(date.getDate() + step * 7);
}, function (start, end) {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration.durationMinute) / _duration.durationWeek;
});
}
var sunday = exports.sunday = weekday(0);
var monday = exports.monday = weekday(1);
var tuesday = exports.tuesday = weekday(2);
var wednesday = exports.wednesday = weekday(3);
var thursday = exports.thursday = weekday(4);
var friday = exports.friday = weekday(5);
var saturday = exports.saturday = weekday(6);
var sundays = exports.sundays = sunday.range;
var mondays = exports.mondays = monday.range;
var tuesdays = exports.tuesdays = tuesday.range;
var wednesdays = exports.wednesdays = wednesday.range;
var thursdays = exports.thursdays = thursday.range;
var fridays = exports.fridays = friday.range;
var saturdays = exports.saturdays = saturday.range;
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.months = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var month = (0, _interval2.default)(function (date) {
date.setDate(1);
date.setHours(0, 0, 0, 0);
}, function (date, step) {
date.setMonth(date.getMonth() + step);
}, function (start, end) {
return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
}, function (date) {
return date.getMonth();
});
exports.default = month;
var months = exports.months = month.range;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.years = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var year = (0, _interval2.default)(function (date) {
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, function (date, step) {
date.setFullYear(date.getFullYear() + step);
}, function (start, end) {
return end.getFullYear() - start.getFullYear();
}, function (date) {
return date.getFullYear();
});
// An optimized implementation for this simple case.
year.every = function (k) {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : (0, _interval2.default)(function (date) {
date.setFullYear(Math.floor(date.getFullYear() / k) * k);
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, function (date, step) {
date.setFullYear(date.getFullYear() + step * k);
});
};
exports.default = year;
var years = exports.years = year.range;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcMinutes = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var utcMinute = (0, _interval2.default)(function (date) {
date.setUTCSeconds(0, 0);
}, function (date, step) {
date.setTime(+date + step * _duration.durationMinute);
}, function (start, end) {
return (end - start) / _duration.durationMinute;
}, function (date) {
return date.getUTCMinutes();
});
exports.default = utcMinute;
var utcMinutes = exports.utcMinutes = utcMinute.range;
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcHours = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var utcHour = (0, _interval2.default)(function (date) {
date.setUTCMinutes(0, 0, 0);
}, function (date, step) {
date.setTime(+date + step * _duration.durationHour);
}, function (start, end) {
return (end - start) / _duration.durationHour;
}, function (date) {
return date.getUTCHours();
});
exports.default = utcHour;
var utcHours = exports.utcHours = utcHour.range;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcDays = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var utcDay = (0, _interval2.default)(function (date) {
date.setUTCHours(0, 0, 0, 0);
}, function (date, step) {
date.setUTCDate(date.getUTCDate() + step);
}, function (start, end) {
return (end - start) / _duration.durationDay;
}, function (date) {
return date.getUTCDate() - 1;
});
exports.default = utcDay;
var utcDays = exports.utcDays = utcDay.range;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcSaturdays = exports.utcFridays = exports.utcThursdays = exports.utcWednesdays = exports.utcTuesdays = exports.utcMondays = exports.utcSundays = exports.utcSaturday = exports.utcFriday = exports.utcThursday = exports.utcWednesday = exports.utcTuesday = exports.utcMonday = exports.utcSunday = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
var _duration = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function utcWeekday(i) {
return (0, _interval2.default)(function (date) {
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
date.setUTCHours(0, 0, 0, 0);
}, function (date, step) {
date.setUTCDate(date.getUTCDate() + step * 7);
}, function (start, end) {
return (end - start) / _duration.durationWeek;
});
}
var utcSunday = exports.utcSunday = utcWeekday(0);
var utcMonday = exports.utcMonday = utcWeekday(1);
var utcTuesday = exports.utcTuesday = utcWeekday(2);
var utcWednesday = exports.utcWednesday = utcWeekday(3);
var utcThursday = exports.utcThursday = utcWeekday(4);
var utcFriday = exports.utcFriday = utcWeekday(5);
var utcSaturday = exports.utcSaturday = utcWeekday(6);
var utcSundays = exports.utcSundays = utcSunday.range;
var utcMondays = exports.utcMondays = utcMonday.range;
var utcTuesdays = exports.utcTuesdays = utcTuesday.range;
var utcWednesdays = exports.utcWednesdays = utcWednesday.range;
var utcThursdays = exports.utcThursdays = utcThursday.range;
var utcFridays = exports.utcFridays = utcFriday.range;
var utcSaturdays = exports.utcSaturdays = utcSaturday.range;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcMonths = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var utcMonth = (0, _interval2.default)(function (date) {
date.setUTCDate(1);
date.setUTCHours(0, 0, 0, 0);
}, function (date, step) {
date.setUTCMonth(date.getUTCMonth() + step);
}, function (start, end) {
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
}, function (date) {
return date.getUTCMonth();
});
exports.default = utcMonth;
var utcMonths = exports.utcMonths = utcMonth.range;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.utcYears = undefined;
var _interval = __webpack_require__(0);
var _interval2 = _interopRequireDefault(_interval);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var utcYear = (0, _interval2.default)(function (date) {
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, function (date, step) {
date.setUTCFullYear(date.getUTCFullYear() + step);
}, function (start, end) {
return end.getUTCFullYear() - start.getUTCFullYear();
}, function (date) {
return date.getUTCFullYear();
});
// An optimized implementation for this simple case.
utcYear.every = function (k) {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : (0, _interval2.default)(function (date) {
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, function (date, step) {
date.setUTCFullYear(date.getUTCFullYear() + step * k);
});
};
exports.default = utcYear;
var utcYears = exports.utcYears = utcYear.range;
/***/ })
/******/ ]);
});
|