代码拉取完成,页面将自动刷新
import * as moment from 'moment';
// const { VM } = require('vm2')
class Test {
async test() {
// let ss = moment('1506577283000','X').add(12,'month');
// let aa = new Date(ss).getTime();
// console.log('Number(ss) * 2__________________',aa/1000);
// let startDate = new Date().getTime();
// let calcNum = Number('1507564800000');
// //60480000
// let result = endDate - startDate;
// console.log('result__________________',result);
// console.log(' new Date().getTime()__________________', new Date().getTime());
/* let date = '2017-10-12T08:16:29.133Z';
let calcDate = moment(date,'X').add(1,'month');
let ss = new Date(calcDate).getTime() + ''
console.log('__________________',ss); */
// let arr:any[] = [{projectName : '呵呵',projectId:'1111'},{projectName : 'ss',projectId:'1121'},{projectName : 'qq',projectId:'1233'},]
// let arr1 :any[] = ['呵呵','ss']
// let obj:string = '呵呵';
// let vm = new VM(
// { timeout: 1000, sandbox: {projectName:arr }}
// )
// let ss = vm.run({projectName:obj })
// let res = arr1.indexOf(obj);
// console.log('res__________________',ss);
let calcDate = moment().add(3,'month');
let upToDate = new Date(calcDate).getTime() + '';//截至日期 时间戳
let ss = moment(calcDate).format("YYYY-MM-DD")
console.log('__________________',ss);
// console.log('__________________', new Date('2017-10-24 14:08:14.914Z').getTime());
// console.log('mo__________________',String(moment().year()) + String(moment().month()+1));
console.log('__________________',moment().format("YYYY-MM-DD"));
// let ss1 = {a :'111'};
// ss1.a = !!ss1.a
}
}
let test = new Test();
test.test();
export default test;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。