Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data () {
return {
// model: '2016-09-18T10:45:00.000Z',
model: undefined,
modelVar: undefined,
// model: 0,
defaultValue: '2016-09-18T10:45:00.000Z',
format: 'MMMM D, YYYY [at] h:mm [[]a[\\]]',
minMaxModel: date.formatDate(day),
min: date.subtractFromDate(day, {days: 5}),
max: date.addToDate(day, {days: 4, month: 1, minutes: 10})
}
},
computed: {
data () {
return {
model: undefined,
minMaxModel: date.formatDate(day),
min: date.subtractFromDate(day, {days: 45}),
max: date.addToDate(day, {days: 8, month: 4, minutes: 10}),
typeDate: true,
typeTime: true
}
},
computed: {
dateAdjustWeekday (thisDateObject, weekdayNum) {
let checkDate = new Date()
let adjustForward = true
if (weekdayNum < 0) {
adjustForward = false
weekdayNum = Math.abs(weekdayNum)
}
for (let counter = 0; counter <= 6; counter++) {
if (adjustForward) {
checkDate = date.addToDate(thisDateObject, { days: counter })
}
else {
checkDate = date.subtractFromDate(thisDateObject, { days: counter })
}
if (date.getDayOfWeek(checkDate) === weekdayNum) {
return checkDate
}
}
},
buildWeekDateArray: function (numberOfDays) {
getForcedWeekDateArray: function (numberOfDays) {
let bookendDates = this.getForcedWeekBookendDates()
let returnArray = []
for (let counter = 0; counter <= numberOfDays - 1; counter++) {
returnArray.push(
date.addToDate(bookendDates.first, { days: counter })
)
}
return returnArray
},
getWeekDateArray: function (numberOfDays) {
moveTimePeriod: function (params) {
let paramObj = {}
paramObj[params.unitType] = params.amount
this.workingDate = date.addToDate(this.workingDate, paramObj)
},
setTimePeriod: function (params) {
getWeekDateArray: function (numberOfDays) {
let returnArray = []
for (let counter = 0; counter <= numberOfDays - 1; counter++) {
returnArray.push(
date.addToDate(this.workingDate, { days: counter })
)
}
return returnArray
},
formatTimeFromNumber: function (hourNumber) {
setADateToADay: function (dateObject, addDays) {
let now = new Date()
if (typeof dateObject === 'string') {
dateObject = new Date(dateObject)
}
dateObject = date.adjustDate(
dateObject, {
year: now.getFullYear(),
month: now.getMonth() + 1,
date: now.getDate()
}
)
if (addDays !== undefined) {
dateObject = date.addToDate(
dateObject, {
days: addDays
}
)
}
return dateObject
},
getSqlDateFormat: function (dateObject, withTime) {