diff --git a/editor/src/formula.js b/editor/src/formula.js index 897dcbf..8b87a51 100644 --- a/editor/src/formula.js +++ b/editor/src/formula.js @@ -28,6 +28,14 @@ function dateAdd(d, 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) { return date(d).format(fmt) } @@ -63,6 +71,8 @@ function dateDiff(a, b, g) { export default { date, dateAdd, + dateSet, + dateGet, dateFormat, dateStartOf, dateEndOf,