deving
This commit is contained in:
64
res/assets/libs/moment-js/test.js
Normal file
64
res/assets/libs/moment-js/test.js
Normal file
@@ -0,0 +1,64 @@
|
||||
var moment = require('./build/moment');
|
||||
// var moment = require('./moment');
|
||||
// moment.config({
|
||||
// formatString: {
|
||||
// "r": "YYYY"
|
||||
// },
|
||||
// now:"2016-07-11T18:42:34.453+08:00"
|
||||
// });
|
||||
|
||||
// console.log(moment());
|
||||
|
||||
console.log(moment("2016-07-03").endOf(moment.MONTH).format("ff"))
|
||||
// console.log(moment('2016-07-23').distance(moment(),moment.DAY))
|
||||
|
||||
// console.log(moment().toString());
|
||||
// console.log(moment().format());
|
||||
// console.log(moment().format("l"));
|
||||
// console.log(moment().format("ll"));
|
||||
// console.log(moment().format("k"));
|
||||
// console.log(moment().format("kk"));
|
||||
// console.log(moment().format("kkk"));
|
||||
// console.log(moment().format("f"));
|
||||
// console.log(moment().format("ff"));
|
||||
// console.log(moment().format("fff"));
|
||||
// console.log(moment().format("n"));
|
||||
// console.log(moment().format("nn"));
|
||||
// console.log(moment().format("r"));
|
||||
|
||||
// console.log(moment(1459235037).format());
|
||||
// console.log(moment(1459235037000).format());
|
||||
// console.log(moment([2016,11,23,4,3,5]).format("f"));
|
||||
// console.log(moment([2015,12,3]).format());
|
||||
// console.log(moment("2014-12-03").format("f"));
|
||||
// console.log(moment("2014-12-03 12:34").format("f"));
|
||||
// console.log(moment("2014-12-03 12:34:34").format("f"));
|
||||
// console.log(moment("20141203").format("f"));
|
||||
// console.log(moment("201412031223").format("f"));
|
||||
|
||||
// console.log(moment().year(2018).format());
|
||||
// console.log(moment("2012-10-03 23:59:59").month(8).month());
|
||||
// console.log(moment().isLeapYear());
|
||||
|
||||
// console.log(moment("2012-10-03 23:59:59").add(1,moment.DAY).format("ff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").add(-1,moment.DAY).format("ff"));
|
||||
|
||||
// console.log(moment("2012-10-03 23:59:59").add(26,moment.MONTH).format("ff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").add(-1,moment.YEAR).format("ff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").add(1,moment.MINUTE).format("ff"));
|
||||
|
||||
// console.log(moment().startOf(moment.DAY).format("ff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").startOf(moment.YEAR).format("ff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").startOf(moment.MONTH).format("ff"));
|
||||
// console.log(moment().startOf(moment.HOUR).format("ff"));
|
||||
|
||||
// console.log(moment("2012-10-03 23:59:59").endOf(moment.YEAR).format("fff"));
|
||||
// console.log(moment("2012-10-03 23:59:59").endOf(moment.MONTH).format("fff"));
|
||||
// console.log(moment("2016-07-22 ").distance(moment.NOW,moment.DAY));
|
||||
// console.log(moment())
|
||||
// console.log(moment('2016-07-22'))
|
||||
|
||||
// console.log(moment("2012-10-03 23:59:59").startOf(moment.WEEK,moment.MONDAY).format("fff"))
|
||||
// console.log(moment("2012-10-03 23:59:59").endOf(moment.WEEK,moment.MONDAY).format("fff"))
|
||||
// console.log(moment().getWeekOfMonth(moment.MONDAY))
|
||||
// console.log(moment().format("f"))
|
||||
Reference in New Issue
Block a user