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

9 lines
237 B
JavaScript
Raw Normal View History

2018-11-14 00:55:07 +00:00
import { helper } from '@ember/component/helper';
import { distanceInWordsToNow } from 'date-fns';
export function dateFromNow([date], options = {}) {
return distanceInWordsToNow(date, options);
}
export default helper(dateFromNow);