Socket
Socket
Sign inDemoInstall

vue-hotel-datepicker

Package Overview
Dependencies
12
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-beta.15 to 4.0.0

src/i18n/it.js

20

package.json
{
"name": "vue-hotel-datepicker",
"version": "4.0.0-beta.15",
"version": "4.0.0",
"description": "A responsive date range picker for Vue.js that displays the number of nights selected and allow several useful options like custom check-in/check-out rules, localization support and more",

@@ -40,3 +40,2 @@ "author": "krystalcampioni <hello@krystalcampioni.com>",

"dependencies": {
"core-js": "^3.6.5",
"fecha": "^4.2.0",

@@ -47,16 +46,17 @@ "lodash.throttle": "^4.1.1",

"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.6",
"@vue/cli-plugin-eslint": "~4.5.6",
"@vue/cli-plugin-unit-jest": "~4.5.6",
"@vue/cli-service": "~4.5.6",
"@vue/eslint-config-airbnb": "^5.1.0",
"@vue/cli-plugin-babel": "~4.5.10",
"@vue/cli-plugin-eslint": "~4.5.10",
"@vue/cli-plugin-unit-jest": "~4.5.10",
"@vue/cli-service": "~4.5.10",
"@vue/eslint-config-airbnb": "^5.3.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.1.0",
"@vue/test-utils": "^1.1.2",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"core-js": "^3.8.2",
"eslint": "^6.8.0",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"sass": "^1.26.10",
"sass": "^1.32.4",
"sass-loader": "^8.0.2",

@@ -63,0 +63,0 @@ "vue-template-compiler": "^2.6.12"

@@ -23,10 +23,10 @@ /* eslint-disable vars-on-top */

},
nextDateByDayOfWeek(weekDay, referenceDate) {
nextDateByDayOfWeek(weekDay, referenceDate, i18n) {
const newReferenceDate = new Date(referenceDate)
let newWeekDay = weekDay.toLowerCase()
// const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
const days = this.i18n['day-names']
const days = i18n ? i18n['day-names'] : ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
const referenceDateDay = newReferenceDate.getDay()
for (let i = 7; i--; ) {
for (let i = 7; ; i--) {
if (newWeekDay === days[i]) {

@@ -42,7 +42,7 @@ newWeekDay = i <= referenceDateDay ? i + 7 : i

},
nextDateByDayOfWeekArray(daysArray, referenceDate) {
nextDateByDayOfWeekArray(daysArray, referenceDate, i18n) {
const tempArray = []
for (let i = 0; i < daysArray.length; i++) {
tempArray.push(new Date(this.nextDateByDayOfWeek(daysArray[i], referenceDate)))
tempArray.push(new Date(this.nextDateByDayOfWeek(daysArray[i], referenceDate, i18n)))
}

@@ -52,3 +52,3 @@

},
nextDateByDayOfWeekObject(days, referenceDate) {
nextDateByDayOfWeekObject(days, referenceDate, i18n) {
const daysArray = Object.entries(days)

@@ -58,3 +58,3 @@ .map((e) => (e[1] ? e[0] : false))

return this.nextDateByDayOfWeekArray(daysArray, referenceDate)
return this.nextDateByDayOfWeekArray(daysArray, referenceDate, i18n)
},

@@ -83,12 +83,13 @@ countDays(start, end) {

const firstDay = this.getFirstDayOfMonth(date)
const day = firstDay.getDay()
let offset = 0
if (firstDayOfWeek > 0) {
offset = firstDay.getDay() === 0 ? -7 + firstDayOfWeek : firstDayOfWeek
offset = !day ? -6 : firstDayOfWeek
}
return new Date(firstDay.setDate(firstDay.getDate() - (firstDay.getDay() - offset)))
return new Date(firstDay.setDate(firstDay.getDate() - (day - offset)))
},
getFirstDayOfMonth(date) {
return new Date(date.getFullYear(), date.getMonth(), 1)
return new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0, 0)
},

@@ -95,0 +96,0 @@ getNextMonth(date) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc