当前位置:网站首页>获取本周的开始时间
获取本周的开始时间
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;
},
边栏推荐
- 官方一键安装redis集群
- (2022牛客多校四)N-Particle Arts(思维)
- 从stm32移植ucos2的代码到GD32
- stm32 uses serial port to receive idle interrupt + dma to achieve variable length dma reception
- 域前置通信过程和溯源思路
- Low-Light Image Enhancement via a Deep Hybrid Network阅读札记
- RecyclerView的多选模式
- (2022牛客多校四)K-NIO‘s Sword(思维)
- [Pytorch] Study Notes (1)
- 12 Spark on RDD 分区器
猜你喜欢
随机推荐
(Codeforce 757)E. Bash Plays with Functions(积性函数)
设计分享|基于单片机的P0口驱动LED闪烁
Introduction to Qt (4) - Continuous playback of pictures (the use of two timers)
Low-Light Image Enhancement via a Deep Hybrid Network阅读札记
mysql主从复制
【YOLOv5】6.0环境搭建(不定时更新)
Small program figure display banner
PHP 正则给img的src添加域名
(nowcoder22529C)dinner(容斥原理+排列组合)
Virtual router redundancy protocol VRRP - double-machine hot backup
ArrayAccess 接口用处
STM8L 液晶数码管驱动,温度计液晶屏显示
树莓派wiringPi库的使用补充
积性函数
抽象内部类
MySQL indexes a field in a table
【Tensorflow2】tensorflow1.x-tensorflow2.x一些接口的转变
生成二维码容错级别的问题
[Bug solution] ValueError: Object arrays cannot be loaded when allow_pickle=False
[Tensorflow2] Some interface changes of tensorflow1.x-tensorflow2.x