open-vault/ui/app/helpers/date-from-now.js
2018-11-20 15:15:52 -08:00

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);