Date相关方法与项目迁移

let date = new Date()// Fri Aug 09 2019 09:03:56 GMT+0800 (中国标准时间)
let time = date.getTime()//时间戳  1573522967056
let year = date.getFullYear();//
let month = date.getMonth()+1;//月  此处注意月份是从0开始的
let day = date.getDate();//日    0--31
let week = date.getDay();//周几  0--6
let hours = date.getHours();//小时
let min = date.getMinutes();//分钟
let sec = date.getSeconds();//
let str = date.toString()     //Fri Aug 09 2019 09:12:38 GMT+0800 (中国标准时间)   把 Date 对象转换为字符串。
let str1 = date.toTimeString()  //09:12:38 GMT+0800 (中国标准时间)   把 Date 对象的时间部分转换为字符串。
let str2 = date.toDateString()  //Fri Aug 09 2019      把 Date 对象的日期部分转换为字符串。
let srt3 = date.toLocaleString()  //2019/8/9 上午9:13:26   根据本地时间格式,把 Date 对象转换为字符串。
let str4 = date.toLocaleTimeString()  //上午9:17:38   根据本地时间格式,把 Date 对象的时间部分转换为字符串。
let str5 = date.toLocaleDateString()  //2019/8/9   根据本地时间格式,把 Date 对象的日期部分转换为字符串。
let str6 = date.valueOf()  //1565313556945   根据世界时返回 1970 年 1 月 1 日 到指定日期的毫秒数
let str7 = new Date(1567267200000)  //时间戳转为标准时间格式
let str8 = new Date('2019-8-2').getTime()  //1564675200000  日期格式转换为时间戳  2018-8、2019-8-8、2019-4/5、2019-04-05

 项目要求从gitLab迁移到阿里云

  1. 保持本地代码是最新的
    git pull

  2. 查看远程分支
    git remote -v

  3. 删除本地项目与gitlab的联系
    git remote remove origin

  4. 建立本地项目与阿里云的联系
    git remote add origin 目的地地址

  5. 推送本地代码到阿里云
    git push

 
posted @ 2021-05-18 16:11  青春☞自由☜旅行  阅读(149)  评论(0)    收藏  举报