当前位置:网站首页>JS foundation -- Date object
JS foundation -- Date object
2022-06-11 09:38:00 【Snatch bamboo shoots 123】
Catalog
Create objects
Grammar format
// Create a date time object
var mydate=new Date();
Operating year 、 month 、 Japan
The way to get time
| Method | Range | |
|---|---|---|
| year | getFullYear() | Four digit year |
| month | getMonth() | 0-12 |
| Japan | getDate() | 1-31 |
| week | getDay() | 0-6 |
How to set the time
| Method | describe | Be careful |
|---|---|---|
| setFullYear(year,month,day) | Set year 、 month 、 Japan | year Is a required parameter |
| setMonth(month,day) | Set month 、 Japan | month Is a required parameter |
| setDate(day) | Set day | day Is a required parameter |
In operation 、 branch 、 second
The way to get time
| Method | Range | |
|---|---|---|
| Hours | getHours() | 0-23 |
| minute | getMinutes() | 0-59 |
| second | getSeconds() | 0-59 |
| millisecond | getMilliseconds() | 0-999 |
| Time stamp | getTime() |
How to set the time
| Method | describe | Be careful |
|---|---|---|
| setHours(hour,min,sec,millisec) | When setting 、 branch 、 second 、 millisecond | hour Is a required parameter |
| setMinutes(min,sec,millisec) | Set points 、 second 、 millisecond | min Is a required parameter |
| setSeconds(sec,millisec) | Set seconds 、 millisecond | sec Is a required parameter |
边栏推荐
- Openstack explanation (24) -- registration of neutron service
- Detailed explanation of the difference between construction method and method
- 企业需要考虑的远程办公相关问题
- Opencv oak-d-w wide angle camera test
- [software] ten skills to maximize the value of ERP system
- Opencv image basic operation (IV) -- image feature extraction (corner detection)
- 剑指 Offer II 041. 滑动窗口的平均值
- Importance of implementation of clothing ERP in the project
- Augmented reality experiment IV of Shandong University
- The first TOF related data set available for deep learning: deep learning for confidence information in stereo and TOF data fusion (iccv 2017)
猜你喜欢

The first TOF related data set available for deep learning: deep learning for confidence information in stereo and TOF data fusion (iccv 2017)

Shandong University project training (IV) -- wechat applet scans web QR code to realize web login

Don't use redis list to implement message queue. Stream is designed for queues

Detailed explanation of this and static

Openstack explanation (21) -- installation and configuration of neutron components

Day44 database

DOS command virtual environment

OpenCV CEO教你用OAK(五):基于OAK-D和DepthAI的反欺骗人脸识别系统

ESP8266_通过MQTT协议连接阿里云

报错ModularNotFoundError: No module named ‘find_version’
随机推荐
Résumé de la méthode d'examen des mathématiques
Development of PCBA circuit board for small oxygen generator
【ROS】noedic-moveit安装与UR5模型导入
Typescript -- preliminary study of variable declaration
Strength and appearance Coexist -- an exclusive interview with Liu Yu, a member of Apache pulsar PMC
关于原型及原型链
Version mismatch between installed deeply lib and the required one by the script
Type-C Bluetooth speaker single port rechargeable OTG solution
报错RuntimeError: BlobReader error: The version of imported blob doesn‘t match graph_transformer
2161. 根据给定数字划分数组
Slice of go language foundation
document对象
ESP8266_接入百度物联网核心套件、使用MQTT协议通信
Method (common method), method execution memory analysis, method overloading mechanism, method recursion
Output image is bigger (1228800b) than maximum frame size specified in properties (1048576b)
Concurrent programming
Control statement if switch for while while break continue
Augmented reality experiment IV of Shandong University
How to deal with these problems in the factory production process?
Opencv oak-d-w wide angle camera test