diff --git a/lib/timeline/component/CurrentTime.js b/lib/timeline/component/CurrentTime.js index f63b27c..398e1af 100644 --- a/lib/timeline/component/CurrentTime.js +++ b/lib/timeline/component/CurrentTime.js @@ -105,7 +105,7 @@ class CurrentTime extends Component { } locale = this.options.locales['en']; // fall back on english when not available } - let title = `${locale.current} ${locale.time}: ${now.format('dddd, MMMM Do YYYY, H:mm:ss')}`; + let title = `${locale.current} ${locale.time}: ${now.format('LLLL')}`; title = title.charAt(0).toUpperCase() + title.substring(1); if (this.options.rtl) { diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index 8070074..64b54e6 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -149,7 +149,7 @@ class CustomTime extends Component { let title = this.options.title; // To hide the title completely use empty string ''. if (title === undefined) { - title = `${locale.time}: ${this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss')}`; + title = `${locale.time}: ${this.options.moment(this.customTime).format('LLLL')}`; title = title.charAt(0).toUpperCase() + title.substring(1); } else if (typeof title === "function") { title = title.call(this.customTime); diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index 5144b4c..e7c8063 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -312,9 +312,9 @@ class Item { templateFunction = this.options.tooltipOnItemUpdateTime.template.bind(this); content = templateFunction(this.data); } else { - content = `start: ${moment(this.data.start).format('MM/DD/YYYY hh:mm')}`; + content = `start: ${moment(this.data.start).format('L LT')}`; if (this.data.end) { - content += `
end: ${moment(this.data.end).format('MM/DD/YYYY hh:mm')}`; + content += `
end: ${moment(this.data.end).format('L LT')}`; } } this.dom.onItemUpdateTimeTooltip.innerHTML = content; diff --git a/package.json b/package.json index 52e7a05..9a2f6b5 100644 --- a/package.json +++ b/package.json @@ -31,47 +31,58 @@ "scripts": { "test": "testcafe chrome tests/UI/" }, + "browserify": { + "transform": [ + [ + "babelify", + { + "presets": [ + "@babel/preset-env" + ] + } + ] + ] + }, "dependencies": { "emitter-component": "^1.1.1", "hammerjs": "^2.0.8", "keycharm": "^0.2.0", - "moment": "^2.18.1", - "propagating-hammerjs": "^1.4.6", + "moment": "^2.24.0", + "propagating-hammerjs": "^1.4.7", "timsort": "^0.3.0" }, "devDependencies": { - "@babel/core": "^7.2.2", - "@babel/plugin-transform-runtime": "^7.2.0", - "@babel/polyfill": "^7.2.5", - "@babel/preset-env": "^7.3.1", - "@babel/runtime": "^7.2.0", - "async": "^2.5.0", - "babel-cli": "^6.26.0", - "babel-jest": "^24.0.0", - "babel-loader": "^8.0.5", + "@babel/core": "^7.5.5", + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/polyfill": "^7.4.4", + "@babel/preset-env": "^7.5.5", + "@babel/runtime": "^7.5.5", + "async": "^3.1.0", + "babel-jest": "^24.8.0", + "babel-loader": "^8.0.6", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0", - "babelify": "^7.3.0", - "clean-css": "^4.1.7", - "eslint": "^4.3.0", - "gulp": "^4.0.0", - "gulp-clean-css": "^3.7.0", + "babelify": "^10.0.0", + "clean-css": "^4.2.1", + "eslint": "^6.1.0", + "gulp": "^4.0.2", + "gulp-clean-css": "^4.2.0", "gulp-concat": "^2.6.1", - "gulp-eslint": "^4.0.0", - "gulp-rename": "^1.2.2", + "gulp-eslint": "^6.0.0", + "gulp-rename": "^1.4.0", "gulp-util": "^3.0.8", - "jest": "^24.0.0", - "jsdoc": "^3.5.5", - "jsdom": "11.3.0", + "jest": "^24.8.0", + "jsdoc": "^3.6.3", + "jsdom": "15.1.1", "jsdom-global": "^3.0.2", - "merge-stream": "^1.0.1", - "mocha": "^5.2.0", - "nyc": "^11.2.1", - "rimraf": "^2.6.1", - "testcafe": "^0.23.3", - "uglify-js": "^2.8.29", - "uuid": "^3.1.0", - "webpack": "^3.3.0", - "yargs": "^8.0.2" + "merge-stream": "^2.0.0", + "mocha": "^6.2.0", + "nyc": "^14.1.1", + "rimraf": "^2.6.3", + "testcafe": "^1.3.3", + "uglify-js": "^3.6.0", + "uuid": "^3.3.2", + "webpack": "^4.38.0", + "yargs": "^13.3.0" } }