<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
font-family: "Microsoft YaHei", serif;
}
body, dl, dd, p, h1, h2, h3, h4, h5, h6 {
margin: 0;
}
ol, ul, li {
margin: 0;
padding: 0;
list-style: none;
}
img {
border: none
}
</style>
</head>
<body>
<div id="wrap"></div>
<script>
// 日期对象
// 获取的是本地电脑的时间
// 这是一个日期对象 data中存储的是一个对象不是字符串
let date = new Date();
// 返回的是数字
console.log(date.getFullYear());
console.log(date.getMonth()+1); //获取的是0-11月 需要+1
console.log(date.getDate());
console.log(date.getHours());
console.log(date.getMinutes());
console.log(date.getSeconds());
// 星期几
// 0-6
// 周日-周六
// 转换成国际标准时间字符串
console.log(date.toUTCString());
// 1970.1.1
console.log(date.getTime());
console.log(date-0);
console.log(new Date()); //当前时间戳
console.log(new Date(1997,1,1)); //自定义时间戳
</script>
</body>
</html>
Python3Turtle