This commit is contained in:
2022-02-23 01:02:17 +00:00
parent e77c8283f5
commit 384c5f6869
4 changed files with 91 additions and 88 deletions

View File

@@ -414,7 +414,12 @@ export default {
//https://moment.github.io/luxon/api-docs/index.html#datetimeplus
//
addDurationToUTC8601String(val, duration) {
if (!val || val == "" || duration == null || !this.isObject(duration)) {
if (
!val ||
val == "" ||
duration == null ||
!typeof duration === "object"
) {
return val;
}
//instantiate a luxon date object from val which is assumed to be an iso string