当前位置:网站首页>Use of date
Use of date
2022-07-27 23:48:00 【yibucuo】
ECMAScript Of Date Type reference Java In earlier versions java.util.Date. So ,Date Type will date
Save as self coordinated universal time (UTC,Universal Time Coordinated) Time 1970 year 1 month 1 Midnight ( zero hour ) So far
Milliseconds elapsed . Using this storage format ,Date Types can be expressed precisely 1970 year 1 month 1 Before and after 285 616 Year of
date .
To create a date object , Just use new Operator to call Date Constructors :
Date.now();
let date1 = new Date(2019, 0, 1); // 2019 year 1 month 1 Japan
let date2 = new Date(2019, 1, 1); // 2019 year 2 month 1 Japan
var date = new Date()
console.log(date.getFullYear());//2022
console.log(date.getMonth());//6 It's actually 7 month
console.log(date.getDate());//27
console.log(date.getDay());//3
console.log(date.getHours());//9
console.log(date.getMinutes());//25
console.log(date.getSeconds());//15
console.log(date.getMilliseconds());//904
console.log(date.getTime());//1658885190098
console.log(Date.now());// 1658885190098
console.log(new Date(2022, 6).getMonth()); // 6
console.log(new Date(2022, 6).getDate()); // 1
console.log(new Date(2022, 6, 0).getDate()); // In fact, it represents 6 Monthly 30 God
console.log(new Date(2022, 7, 0).getDate()); // In fact, it represents 7 Monthly 31 God
console.log(new Date(2022, 12, 0).getDate()); // In fact, it represents 12 Monthly 31 God
console.log(new Date(2022, 14, 0).getDate()); // In fact, it represents 2023 year 2 Monthly 28 God


边栏推荐
- 进制转换方法
- 基于原生js实现今日新闻网站
- 携手长江存储,江波龙推出全球最小扩展卡
- Bank marketing predicts the success rate of a customer's purchase of financial products
- Remotely debug idea, configure remote debug, and add JVM startup parameter -xdebug in the program of remote server
- Key points of data management
- 为什么 Redis 集群要使用反向代理? 看这篇就明白了
- The first activity of togaf10 standard reading club was successfully held, and the wonderful moments were reviewed!
- [MRCTF2020]babyRSA
- C#委托用法--控制台项目,通过委托实现事件
猜你喜欢

突发,微信重要通知

真的很难理解?RecyclerView 缓存机制到底是几级缓存?

2022夏暑假每日一题(五)

技术认证 | 图扑软件携手华为云再创合作共赢新局面

【12月海口】2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)

CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021

CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021

Character stream learning 14.3

Bank marketing predicts the success rate of a customer's purchase of financial products

Is it really hard to understand? What level of cache is the recyclerview caching mechanism?
随机推荐
基于原生js实现今日新闻网站
为什么需要等待计时2MSL?
The share price soared 180.46%! Shanghai silicon industry, the leader of domestic large silicon wafers, is listed: the cumulative net profit in recent four years is less than 60million
如果我们是那晚负责修复 B 站崩了的开发人员
(十二)51单片机----用DS18B20浅测一下工(江)西的室外温度
ZCMU--1720: 死亡如风,我要装逼
15million per day! BYD masks won a US $1billion order in California
数据管理的重点
TOGAF10标准读书会首场活动圆满举办,精彩时刻回顾!
【12月海口】2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)
org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
Zabbix4.0 uses SNMP agent to monitor vcenter6.5
加速IGBT国产化!比亚迪半导体将独立上市,市值或达300亿元!
[RoarCTF2019]babyRSA威尔逊定理
ELK日志分析系统安装和部署
7.6万人停工!东芝宣布关闭日本所有工厂
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: un
29.学习Highcharts 使用百分比的堆叠柱形图
钉钉报警工具
JS array copy speed test 220320