当前位置:网站首页>JS gets the year, month, day, time, etc. of the current time
JS gets the year, month, day, time, etc. of the current time
2022-08-10 04:29:00 【weixin_43923808】
var date = new Date();date .getYear(); //Get the current year (2 digits)date .getFullYear(); //Get the full year (4 digits)date .getMonth(); //Get the current month (0-11, 0 represents January)date .getDate(); //Get the current day (1-31)date .getDay(); //Get the current week X (0-6, 0 represents Sunday)date .getTime(); //Get the current time (the number of milliseconds since 1970.1.1)date .getHours(); //Get the current hour (0-23)date .getMinutes(); //Get the current minute (0-59)date .getSeconds(); //Get the current number of seconds (0-59)date .getMilliseconds(); //Get the current number of milliseconds (0-999)date .toLocaleDateString(); //Get the current datevar mytime=date .toLocaleTimeString(); //Get the current timedate .toLocaleString( ); //Get the date and time边栏推荐
猜你喜欢
随机推荐
#【软件STM32cubeIDE下F103配置uart3+DMA收发+简单数据解析-基础样例】
2022年P气瓶充装操作证考试题库及模拟考试
[crit] 23856#0: *101796511 stat()
2022华数杯思路分析
【MindSpore功能】运行SSD-MobileNetV1 FPN样例报错
阿笑家的黄桃
【Web3 系列开发教程——创建你的第一个 NFT(7)】创建一个 NFT DApp,给你的 NFT 赋予属性,例如图片
【sql】不同库查询前几条记录用法
JS获取当前时间的年、月、日、时间等
TCP协议之《ACK报文限速》
ZZULIOJ:1013: 求两点间距离
X书6.97版本shield-unidbg调用方式
数据切片问题
结构体的内存对齐问题
什么是遗留代码:有效地处理遗留代码的8个小贴士
UDP协议之《套接口阻塞选项UDP_CORK》
打开VsCode经常弹出:尝试在目标目录创建文件时发生一个错误:拒绝访问:重试 跳过这个文件(不推荐),关闭安装程序
深入学习Synchronized各种使用方法
郑州轻工业大学OJ合集(C语言)【正在整理】
PID整定方法









