open-vault/ui/app/helpers/date-from-now.js

9 lines
237 B
JavaScript

import { helper } from '@ember/component/helper';
import { distanceInWordsToNow } from 'date-fns';
export function dateFromNow([date], options = {}) {
return distanceInWordsToNow(date, options);
}
export default helper(dateFromNow);