Skip to content

Commit

Permalink
Fix date dns
Browse files Browse the repository at this point in the history
  • Loading branch information
AchoArnold committed May 3, 2024
1 parent 78fda6d commit 58af6d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/plugins/filters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue'
import { intervalToDuration, formatDuration } from 'date-fns'
import * as fns from 'date-fns'
import { parsePhoneNumber, isValidPhoneNumber } from 'libphonenumber-js'

Vue.filter('phoneNumber', (value: string): string => {
Expand Down Expand Up @@ -50,9 +50,9 @@ Vue.filter('billingPeriod', (value: string): string => {
})

Vue.filter('humanizeTime', (value: string): string => {
const durations = intervalToDuration({
const durations = fns.intervalToDuration({
start: new Date(),
end: new Date(value),
})
return formatDuration(durations)
return fns.formatDuration(durations)
})

0 comments on commit 58af6d1

Please sign in to comment.