Feature Request: moment-range
hoIIer opened this issue · 2 comments
hoIIer commented
It would be great if this library contained a template helper to automatically create a range of dates using moment-range
willviles commented
@erichonkanen check this: jasonmit/ember-cli-moment-shim#163
BenjaminBeck commented
Or alternative:
https://www.npmjs.com/package/ember-cli-cjs-transform
and https://www.npmjs.com/package/moment-range
ember-cli-build.js:
app.import('node_modules/moment-range/dist/moment-range.js',{
using: [
{ transformation: 'cjs', as: 'moment-range'}
]
});
your-componen.js:
import momentRange from 'moment-range';
import momentTime from "moment";
const moment = momentRange.extendMoment(momentTime);
...
let range = moment.range(beginMoment, endMoment);
...