当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
【mindspore】【Categorical】softmax数据放入Categorical类出现和不为1的错误
UDP协议之《套接口阻塞选项UDP_CORK》
Unity Shader 积雪效果
音乐现场的未来将被NFT门票主宰?
Ueditor编辑器任意文件上传漏洞
TCP协议之《对端MSS值估算》
一种能让大型数据聚类快2000倍的方法,真不戳
JVM内存模型
微信公众号开发
2022年R2移动式压力容器充装考试题库模拟考试平台操作
TCP协议之《自动阻塞CORK控制》
PID与ADRC
X书6.97版本shield-unidbg调用方式
ZZULIOJ:1020: 两整数排序
ZZULIOJ:1027: 判断水仙花数
兴盛优选监控场景的时序数据库选型与落地实践
TCP协议之《延迟ACCEPT》
第九章、类的生命周期
JS获取当前时间的年、月、日、时间等
order by注入与limit注入