Lines Matching +defs:r +defs:date

66 /******/ 	__webpack_require__.r = function(exports) {
83 /******/ __webpack_require__.r(ns);
146 !function(e){if(true)module.exports=e();else { var f; }}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
3184 var r = this._execute(executor, function(value) {
3192 if (r !== undefined) {
3193 promise._rejectCallback(r, true);
5157 function thrower(r) {
5158 throw r;
6515 date: "%d %M"
6604 /***/ "./sources/core/common/date.js":
6606 !*** ./sources/core/common/date.js ***!
6636 var s = locale.date.month_short;
6637 var t = locale.date.month_short_hash = {};
6641 var s = locale.date.month_full;
6642 var t = locale.date.month_full_hash = {};
6646 date_part: function (date) {
6647 var old = new Date(date);
6648 date.setHours(0);
6649 this.hour_start(date);
6650 if (date.getHours() && //shift to yesterday on dst
6651 (date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()))
6652 date.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));
6653 return date;
6655 time_part: function (date) {
6656 return (date.valueOf() / 1000 - date.getTimezoneOffset() * 60) % 86400;
6658 week_start: function (date) {
6659 var shift = date.getDay();
6664 return this.date_part(this.add(date, -1 * shift, "day"));
6666 month_start: function (date) {
6667 date.setDate(1);
6668 return this.date_part(date);
6670 quarter_start: function (date) {
6671 this.month_start(date);
6672 var m = date.getMonth(),
6685 date.setMonth(res_month);
6686 return date;
6688 year_start: function (date) {
6689 date.setMonth(0);
6690 return this.month_start(date);
6692 day_start: function (date) {
6693 return this.date_part(date);
6695 hour_start: function (date) {
6696 if (date.getMinutes())
6697 date.setMinutes(0);
6698 this.minute_start(date);
6700 return date;
6702 minute_start: function (date) {
6703 if (date.getSeconds())
6704 date.setSeconds(0);
6705 if (date.getMilliseconds())
6706 date.setMilliseconds(0);
6707 return date;
6709 _add_days: function (date, inc) {
6710 var ndate = new Date(date.valueOf());
6713 if (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst
6714 (ndate.getDate() <= date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()))
6719 add: function (date, inc, mode) {
6721 var ndate = new Date(date.valueOf());
6754 return this["add_" + mode](date, inc, mode);
6759 add_quarter: function (date, inc) {
6760 return this.add(date, inc * 3, "month");
6767 copy: function (date) {
6768 return new Date(date.valueOf());
6774 return "\"+to_fixed(date.getDate())+\"";
6776 return "\"+to_fixed((date.getMonth()+1))+\"";
6778 return "\"+date.getDate()+\"";
6780 return "\"+(date.getMonth()+1)+\"";
6782 return "\"+to_fixed(date.getFullYear()%100)+\"";
6784 return "\"+date.getFullYear()+\"";
6786 return "\"+locale.date.day_short[date.getDay()]+\"";
6788 return "\"+locale.date.day_full[date.getDay()]+\"";
6790 return "\"+locale.date.month_short[date.getMonth()]+\"";
6792 return "\"+locale.date.month_full[date.getMonth()]+\"";
6794 return "\"+to_fixed((date.getHours()+11)%12+1)+\"";
6796 return "\"+((date.getHours()+11)%12+1)+\"";
6798 return "\"+date.getHours()+\"";
6800 return "\"+to_fixed(date.getHours())+\"";
6802 return "\"+to_fixed(date.getMinutes())+\"";
6804 return "\"+(date.getHours()>11?\"pm\":\"am\")+\"";
6806 return "\"+(date.getHours()>11?\"PM\":\"AM\")+\"";
6808 return "\"+to_fixed(date.getSeconds())+\"";
6810 return "\"+to_fixed(getISOWeek(date))+\"";
6812 return "\"+to_fixed(getWeek(date))+\"";
6817 if (utc) format = format.replace(/date\.get/g, "date.getUTC");
6818 var dateToStr = new Function("date", "to_fixed", "locale", "getISOWeek", "getWeek", "return \"" + format + "\";");
6820 return function (date) {
6821 return dateToStr(date, dateHelper.to_fixed, gantt.locale, dateHelper.getISOWeek, dateHelper.getWeek);
6825 var splt = "var temp=date.match(/[a-zA-Z]+|[0-9]+/g);";
6860 splt += "set[1]=locale.date.month_short_hash[temp[" + i + "]]||0;";
6863 splt += "set[1]=locale.date.month_full_hash[temp[" + i + "]]||0;";
6871 var strToDate = new Function("date", "locale", "var set=[0,0,1,0,0,0]; " + splt + " return new Date(" + code + ");");
6878 return gantt.date._getWeekNumber(ndate, true);
6891 var ordinal_date = Math.round((first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)
6897 return gantt.date._getWeekNumber(ndate, gantt.config.start_on_monday);
6900 return gantt.date.getISOWeek(ndate);
6902 convert_to_utc: function (date) {
6903 return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
6905 parseDate: function (date, format) {
6906 // raw date may be of type string, number (timestamp) or something else
6907 // do not check for instanceof Date explicitly, since we may swap native date with different date implementation at some point
6908 if (date && !date.getFullYear) {
6917 format = gantt.defined(gantt.templates[format]) ? gantt.templates[format] : gantt.date.str_to_date(format);
6923 if (date) {
6924 date = format(date);
6926 date = null;
6929 return date;
7530 templates[template_name] = gantt.date.date_to_str(config[name]);
7543 var date = gantt.date;
7546 var d = date.date_to_str;
7549 var parse_date = date.str_to_date(c.xml_date || c.date_format, c.server_utc);
7575 task_end_date: function (date) {
7576 return gantt.templates.task_date(date);
7584 timeline_cell_class: function (item, date) {
7587 scale_cell_class: function (date) {
7590 scale_row_class: function (date) {
7609 date_grid: function (date, item, column) {
7613 return gantt.templates.grid_date_format(date, column);
7663 tooltip_date_format: date.date_to_str("%Y-%m-%d"),
7665 return "<b>Task:</b> " + event.text + "<br/><b>Start date:</b> " + gantt.templates.tooltip_date_format(start) + "<br/><b>End date:</b> " + gantt.templates.tooltip_date_format(end);
7878 //tasks can have fixed duration, children duration(as projects), or one date fixed, and other defined by nested items
8040 date: config,
8045 var date = config.date,
8050 return date;
8055 +date >= +scale.min_date && +date <= +scale.max_date) {
8056 //find date in time scale config
8057 colIndex = Math.floor(gantt.columnIndexByDate(date));
8066 upper = gantt.date.add(lower, steps, unit);
8068 colIndex = Math.floor(gantt.columnIndexByDate(date));
8070 upper = gantt.date[unit + "_start"](new Date(scale.min_date));
8072 upper = gantt.date[unit + "_start"](scale.trace_x[colIndex]);// end of time scale
8075 while (+upper < +date) {
8076 upper = gantt.date[unit + "_start"](gantt.date.add(upper, steps, unit));
8081 if (gantt.date[unit + '_start'])
8082 upper = gantt.date[unit + '_start'](upper);
8085 lower = gantt.date.add(upper, -1 * steps, unit);
8093 if (Math.abs(date - lower) < Math.abs(upper - date)) {
8104 task.start_date = this.getClosestWorkTime({date: task.start_date, dir: 'future', task: task});
10222 task.start_date = gantt.date.parseDate(task.start_date, "parse_date");
10224 task.end_date = gantt.date.parseDate(task.end_date, "parse_date");
11594 posFromDate: function(date) {
11595 var res = tryCall.call(this, getTimeline, "posFromDate", [date]);
11662 columnIndexByDate: function(date) {
11663 var res = tryCall.call(this, getTimeline, "columnIndexByDate", [date]);
11736 showDate: function(date){
11737 var date_x = this.posFromDate(date);
11810 // TODO: rework public api for date methods
11815 getWorkHours: function (date) {
11816 return timeCalculator.getWorkHours(date);
11827 isWorkTime: function (date, unit, task) {
11828 return timeCalculator.isWorkTime(date, unit, task);
11891 gantt.date = __webpack_require__(/*! ./common/date */ "./sources/core/common/date.js")(gantt);
11898 gantt.$services.setService("date", function () {
11899 return gantt.date;
12040 this.date.init();
12330 gantt._correct_dst_change = function(date, prevOffset, step, unit){
12334 var offsetChanged = date.getTimezoneOffset() - prevOffset;
12336 date = gantt.date.add(date, offsetChanged, "minute");
12339 return date;
12394 range.start_date = gantt.date[unit + "_start"](new Date(gantt.config.start_date));
12397 var start_interval = gantt.date[unit + "_start"](new Date(end));
12399 end = gantt.date.add(start_interval, 1, unit);
12437 range.start_date = gantt.date[unit + "_start"](range.start_date);
12439 start_date: gantt.date[unit + "_start"](range.start_date),
12445 range.end_date = gantt.date[unit + "_start"](range.end_date);
12638 var timeLabel = gantt.locale.labels["constraint_date"] || "Constraint date";
13247 return gantt.date.add(startDate, gantt._get_timepicker_step(), "minute");
13869 date: this.date.date_part(new Date(gantt._min_date.valueOf())),
13879 settings.date.setHours(cfg.first_hour);
14103 start_year = start_year || settings.date.getFullYear() - offset;
14114 html += "<option value='" + i + "'>" + gantt.locale.date.month_full[i] + "</option>";
14129 tdate = settings.date.getDate();
14133 time = gantt.templates.time_picker(settings.date);
14136 settings.date.setTime(settings.date.valueOf() + gantt._get_timepicker_step() * 60 * 1000);
14137 diff = (settings.date.getDate() != tdate) ? 1 : 0; // moved or not to the next day
14138 i = diff * 24 * 60 + settings.date.getHours() * 60 + settings.date.getMinutes();
15921 var currDate = gantt.date[scaleUnit + "_start"](new Date(task.start_date));
15925 var date = currDate;
15926 currDate = gantt.date.add(currDate, scaleStep, scaleUnit);
15928 if (!gantt.isWorkTime({date: date, task: task, unit: scaleUnit})) {
15932 var timestamp = date.valueOf();
15947 end = gantt.date.add(start, scaleStep, scaleUnit);
16130 var colEnd = scale.trace_x[i + 1] || gantt.date.add(colStart, scale.step, scale.unit);
16410 date: "%M",
16415 date: "%d",
16422 date: "%d %M",
16429 date: "%d %M",
16434 date: "%H:00",
16441 date: "%d %M",
16446 date: "%H:00",
17397 dateEditorFactory = __webpack_require__(/*! ./editors/date */ "./sources/core/ui/grid/editors/editors/date.js"),
17410 date: new (dateEditorFactory(gantt))(),
17906 /***/ "./sources/core/ui/grid/editors/editors/date.js":
17908 !*** ./sources/core/ui/grid/editors/editors/date.js ***!
17925 dateToStr = gantt.date.date_to_str(html5DateFormat);
17928 strToDate = gantt.date.str_to_date(html5DateFormat);
17960 var html = "<div style='width:140px'><input type='date' " + minAttr + maxAttr + " name='" + column.name + "'></div>";
18571 if((hasEditor && controller.isVisible()) || state.editorType === "date"){
18705 // move task when start date changes
18706 // resize task when end date/duration changes
22281 var r = resizers[i];
22284 var prev = r.$parent.getPrevSibling(r.$id);
22288 var next = r.$parent.getNextSibling(r.$id);
22295 r.$config.css = (r.$config.css ? r.$config.css + " " : "") + "gantt_grid_resize_wrap";
25102 var date = gantt.dateFromPos(pos.x);
25103 var coll = Math.floor(gantt.columnIndexByDate(date));
25167 var dateHelper = gantt.date;
25260 format = scale.template || scale.date || "%d %M";
25264 format = gantt.date.date_to_str(format);
25286 date: services.config().date_scale,
25296 date: primaryScale.date,
25376 _ignore_time_config: function (date, scale) {
25380 var probe = date;
25385 probe = dateHelper.add(date, i, scale.unit);
25451 this.eachColumn(config.unit, config.step, min_date, max_date, function (date) {
25453 cfg.trace_x.push(new Date(date));
25454 cfg.trace_indexes[date.valueOf()] = cfg.trace_x.length - 1;
25948 task.start_date = gantt.roundDate({date: task.start_date, unit: unit, step: step});
25951 task.end_date = gantt.roundDate({date: task.end_date, unit: unit, step: step});
25955 task.start_date = gantt.roundDate({date: task.start_date, unit: unit, step: step});
25966 task.start_date = gantt.getClosestWorkTime({date: task.start_date, dir: 'future', task: task});
25968 task.end_date = gantt.getClosestWorkTime({date: task.end_date, dir: 'past', task: task});
26608 var date = null, css = null;
26610 var content = config.format || config.template || config.date;
26613 content = this.$gantt.date.date_to_str(content);
26633 date = new Date(config.trace_x[i]);
26634 var value = content.call(this, date),
26648 template = css.call(this, date);
26685 var date = new Date(scale.trace_x[ind].valueOf() + Math.round(part * unit));
26686 return date;
26688 posFromDate: function posFromDate(date) {
26692 if(!date){
26696 var dateValue = String(date.valueOf());
26701 var ind = this.columnIndexByDate(date);
26729 var date = +columns[startIndex];
26731 while (ignores[date]) {
26733 date = +columns[visibleDateIndex];
26740 var date = +columns[startIndex];
26742 while (ignores[date]) {
26744 date = +columns[visibleDateIndex];
26755 columnIndexByDate: function columnIndexByDate(date) {
26756 var pos = new Date(date).valueOf();
26793 var part = ((date - days[visibleIndex]) / this._getColumnDuration(this._tasks, days[visibleIndex]));
26849 _getColumnDuration: function _get_coll_duration(scale, date) {
26850 return this.$gantt.date.add(date, scale.step, scale.unit) - date;
27357 function IsWorkTimeArgument(date, unit, task, id, calendar){
27358 this.date = date;
27366 function ClosestWorkTimeArgument(date, dir, unit, task, id, calendar){
27367 this.date = date;
27403 date: config
27409 if(!helpers.isValidDate(config.date)){
27410 gantt.assert(false, "Invalid date argument for getWorkHours method");
27411 throw new Error("Invalid date argument for getWorkHours method");
27429 if (!config.date) {
27430 //IsWorkTimeArgument(date, unit, task, id, calendar)
27433 processedConfig = new IsWorkTimeArgument(config.date, config.unit, config.task, null, config.calendar);
27438 if(!helpers.isValidDate(processedConfig.date)){
27439 gantt.assert(false, "Invalid date argument for isWorkTime method");
27440 throw new Error("Invalid date argument for isWorkTime method");
27456 config.date,
27471 if(!helpers.isValidDate(processedConfig.date)){
27472 gantt.assert(false, "Invalid date argument for getClosestWorkTime method");
27473 throw new Error("Invalid date argument for getClosestWorkTime method");
27495 config.start_date = config.start_date || config.start || config.date;
27592 _getDayHoursForMultiple: function (calendars, date) {
27597 start = this.$gantt.date.day_start(new Date(date));
27614 start = this.$gantt.date.add(start, 1, "hour");
27627 var start = this.$gantt.date.day_start(new Date(259200000)); // 1970 day=0
27631 start = this.$gantt.date.add(start, 1, "day");
27853 } else if (settings.date) {
27855 timestamp = Date.UTC(settings.date.getFullYear(), settings.date.getMonth(), settings.date.getDate());
27859 _checkIfWorkingUnit: function (date, unit, order) {
27871 if (!this._isWorkTime(date, this.units[order - 1], order - 1))
27876 return this["_is_work_" + unit](date);
27880 _is_work_day: function (date) {
27881 var val = this._getWorkHours(date);
27888 _is_work_hour: function (date) {
27889 var hours = this._getWorkHours(date); // [7,12] or []
27890 var hour = date.getHours();
27903 var dateHelper = this.$gantt.date;
27920 var dateHelper = this.$gantt.date;
27973 _getMinutesPerDay: function (date) {
27975 return this._getHoursPerDay(date) * 60;
27977 _getHoursPerDay: function (date) {
27978 var hours = this._getWorkHours(date);
28015 var firstDayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(start)), 1, "day");
28021 var lastDayStart = this.$gantt.date.day_start(new Date(end));
28082 return this._getWorkHours(config.date);
28084 _getWorkHours: function (date) {
28085 var t = this._timestamp({date: date});
28090 } else if (calendar.dates[date.getDay()] !== undefined) {
28091 hours = calendar.dates[date.getDay()];//week day
28131 _isWorkTime: function (date, unit, order) {
28135 var dateKey = String(date.valueOf());
28140 is_work_unit = this._checkIfWorkingUnit(date, unit, order);
28149 return this._isWorkTime(config.date, config.unit);
28248 var interval = this._addInterval(start, duration, "hour", step, function (date) {
28250 if (!(date.getHours() || date.getMinutes() || date.getSeconds() || date.getMilliseconds())) {
28298 var interval = this._addInterval(start, duration, "minute", step, function (date) {
28300 if (!(date.getMinutes() || date.getSeconds() || date.getMilliseconds())) {
28329 return this._getClosestWorkTime(settings.date, settings.unit, settings.dir);
28339 result = this.$gantt.date[unit + '_start'](result);
28357 _getClosestWorkTimeFuture: function (date, unit) {
28358 return this._getClosestWorkTimeGeneric(date, unit, 1);
28361 _getClosestWorkTimePast: function (date, unit) {
28362 var result = this._getClosestWorkTimeGeneric(date, unit, -1);
28364 return this.$gantt.date.add(result, 1, unit);
28367 _getClosestWorkTimeGeneric: function (date, unit, increment) {
28371 var result = date;
28399 result = this.$gantt.date.add(result, increment, unit);
28402 if (this.$gantt.date[unit + '_start']) {
28403 result = this.$gantt.date[unit + '_start'](result);
28441 return config.date;
28454 var dateHelper = this.$gantt.date;
28504 return this.$gantt.date.add(start, step * duration, unit);
28678 return calendar.getWorkHours(config.date);
28696 isWorkTime: function (date, unit, task, calendar) {
29001 date: {
29051 constraint_date: "Constraint date",