Skip to content

Commit

Permalink
Merge pull request #782 from apocist/master
Browse files Browse the repository at this point in the history
@stratusjs/angularjs-extras 0.15.1
  • Loading branch information
alexgurrola authored Jun 5, 2024
2 parents e4ce682 + 73f27f9 commit a3e1104
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/angularjs-extras/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stratusjs/angularjs-extras",
"version": "0.15.0",
"version": "0.15.1",
"description": "This is the AngularJS Extras package for StratusJS.",
"scripts": {},
"repository": {
Expand Down
8 changes: 6 additions & 2 deletions packages/angularjs-extras/src/filters/luxon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import {
Stratus
} from '@stratusjs/runtime/stratus'
import {clone, extend, isEmpty, isObject, isString} from 'lodash'
import {clone, extend, isEmpty, isObject, isString, isUndefined} from 'lodash'
import {DateTime, Interval} from 'luxon'
import {seconds} from '@stratusjs/core/conversion'
import {DurationUnit} from 'luxon/src/duration'
Expand All @@ -30,7 +30,11 @@ const timeDifference = (from: DateTime, until: DateTime, durationUnit?: Duration

const convertLuxon = (date: LuxonPossibleInput, unix?: boolean): DateTime => {
let timeLuxon: DateTime
if ('API::NOW' === date) {
if (
'API::NOW' === date ||
'now' === date ||
isUndefined(date)
) {
date = 'now'
unix = false
}
Expand Down

0 comments on commit a3e1104

Please sign in to comment.