Add dateSet and dateGet functions

This commit is contained in:
Peter Stuifzand 2020-11-08 17:02:02 +01:00
parent 8513e4b96c
commit 13b50cf841

View File

@ -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,