Add dateSet and dateGet functions
This commit is contained in:
parent
8513e4b96c
commit
13b50cf841
|
@ -28,6 +28,14 @@ function dateAdd(d, n, s) {
|
||||||
return date(d).add(n, s)
|
return date(d).add(n, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dateSet(d, n, s) {
|
||||||
|
return date(d).set(s, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
function dateGet(d, s) {
|
||||||
|
return date(d).get(s)
|
||||||
|
}
|
||||||
|
|
||||||
function dateFormat(d, fmt) {
|
function dateFormat(d, fmt) {
|
||||||
return date(d).format(fmt)
|
return date(d).format(fmt)
|
||||||
}
|
}
|
||||||
|
@ -63,6 +71,8 @@ function dateDiff(a, b, g) {
|
||||||
export default {
|
export default {
|
||||||
date,
|
date,
|
||||||
dateAdd,
|
dateAdd,
|
||||||
|
dateSet,
|
||||||
|
dateGet,
|
||||||
dateFormat,
|
dateFormat,
|
||||||
dateStartOf,
|
dateStartOf,
|
||||||
dateEndOf,
|
dateEndOf,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user