当前位置:网站首页>获取本周的开始时间
获取本周的开始时间
2022-08-08 23:32:00 【聰籽】
getCurrentWeekStartTime: function (format) {
var nowTemp = new Date(), //当前时间
cTime = nowTemp.getTime(), //当前时间的毫秒时间
cDay = nowTemp.getDay() || 7, //当前时间的星期几
mTime = cTime - (cDay - 1) * 24 * 60 * 60 * 1000, //当前周一的毫秒时间
monday = new Date(mTime), //设置周一时间对象
mYear = monday.getFullYear(),
mMonth = monday.getMonth() + 1,
mDate = monday.getDate();
if (mMonth < 10) {
mMonth = "0" + mMonth;
}
if (mDate < 10) {
mDate = "0" + mDate;
}
return mYear + '-' + mMonth + '-' + mDate;
},
边栏推荐
猜你喜欢

(2022牛客多校四)H-Wall Builder II(思维)

【CUDA】version switch freely

mysql 高级知识【order by 排序优化】

(2022杭电多校四)1011-Link is as bear(思维+线性基)

记录一些 PostgreSQL问题分析思路

容斥原理

神经网络学习笔记(1)

(2022杭电多校三)1009.Package Delivery(贪心)

牛客练习赛88 D 克鲁斯卡尔重构树
![WeChat applet error undefined Expecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got ]Solution](/img/31/a9b0c31f648d41e300949ac43c5cab.png)
WeChat applet error undefined Expecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got ]Solution
随机推荐
postgresql源码学习(35)—— 检查点⑤-检查点中的XLog清理机制
一命令删除所有指定进程
mysql主从复制
记录一些 PostgreSQL问题分析思路
从stm32移植ucos2的代码到GD32
2022杭电多校六 1009-Map (巴那赫不动点)
循环神经网络实现股票预测
makefile 自动编译 目录和子目录的 C文件
【Tensorflow2】tensorflow1.x-tensorflow2.x一些接口的转变
51nod1798 打怪兽
Introduction to Qt (4) - Continuous playback of pictures (the use of two timers)
【Bug解决】ValueError: Object arrays cannot be loaded when allow_pickle=False
可以在易方达基金上买基金吗,安全吗
WeChat applet develops some function usage methods
php 将时间戳转化为 刚刚、几分钟前、几小时前、几天前 格式
tp5用cache缓存,存储手机短信验证码
mysql 高级知识【order by 排序优化】
06 Spark on RDD序列化问题
抽象内部类
Learning experience of bp neural network