Skip to content

Commit be833b6

Browse files
committed
feat: Inclusive Date Range quasarframework#868
1 parent c72241c commit be833b6

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"babel-preset-stage-2": "^6.17.0",
5454
"colors": "^1.1.2",
5555
"connect-history-api-fallback": "^1.4.0",
56-
"css-loader": "^0.28.7",
56+
"css-loader": "^0.28.10",
5757
"es6-promise-shim": "^0.1.1",
5858
"eslint": "^4.13.1",
5959
"eslint-config-standard": "^10.2.1",
@@ -67,7 +67,7 @@
6767
"eventsource-polyfill": "^0.9.6",
6868
"express": "^4.16.2",
6969
"extract-text-webpack-plugin": "^3.0.1",
70-
"file-loader": "^0.11.1",
70+
"file-loader": "^1.1.9",
7171
"friendly-errors-webpack-plugin": "^1.3.1",
7272
"git-directory-deploy": "^1.5.1",
7373
"html-webpack-plugin": "^2.30.1",
@@ -78,9 +78,9 @@
7878
"progress-bar-webpack-plugin": "^1.9.0",
7979
"quasar-extras": "^1.0.0",
8080
"raw-loader": "^0.5.1",
81-
"rollup": "^0.54.0",
81+
"rollup": "^0.56.2",
8282
"rollup-plugin-babel": "^3.0.2",
83-
"rollup-plugin-buble": "^0.18.0",
83+
"rollup-plugin-buble": "^0.19.2",
8484
"rollup-plugin-json": "^2.1.0",
8585
"rollup-plugin-node-resolve": "^3.0.2",
8686
"rollup-plugin-replace": "^2.0.0",
@@ -101,7 +101,7 @@
101101
"webpack": "^3.10.0",
102102
"webpack-dev-middleware": "^1.12.0",
103103
"webpack-hot-middleware": "^2.20.0",
104-
"webpack-merge": "^4.1.0"
104+
"webpack-merge": "^4.1.2"
105105
},
106106
"peerDependencies": {
107107
"vue": "^2.5.0"

src/utils/date.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,15 @@ export function getWeekOfYear (date) {
8686
return 1 + Math.floor(weekDiff)
8787
}
8888

89-
export function isBetweenDates (date, from, to) {
90-
const
89+
export function isBetweenDates (date, from, to, opts = {}) {
90+
let
9191
d1 = new Date(from).getTime(),
9292
d2 = new Date(to).getTime(),
9393
cur = new Date(date).getTime()
9494

95+
opts.inclusiveFrom && d1--
96+
opts.inclusiveTo && d2++
97+
9598
return cur > d1 && cur < d2
9699
}
97100

0 commit comments

Comments
 (0)