import moment js in javascript file code example Example: import * as moment from 'moment'; npm install moment-strftime