当前位置:网站首页>Get the current week time excluding the current day
Get the current week time excluding the current day
2022-08-08 23:37:00 【Chung seed】
val if the parameter exists, it represents the start time
getWeekTime: function (val, format) {var now = new Date();var dd = 0;var time = '';if (val) {dd = -7;} else {dd = -1;}now.setDate(now.getDate() + dd);var year = now.getFullYear();var month = now.getMonth() + 1;var day = now.getDate();if (month < 10)month = "0" + month;if (day < 10)day = "0" + day;if (val) {time = year + "-" + month + "-" + day + ' 00:00:00';} else {time = year + "-" + month + "-" + day + ' 23:59:59';}return time;},
边栏推荐
- The most commonly used regular expressions
- 获取当前时间的前/后某一天的日期
- 跨域请求浏览器无法显示set-cookie,坑了我一晚上
- 并发编程第5篇,Synchronized的原理
- Master-slave delay reason and solution
- 51nod 2882最短路 (树链剖分)
- 【瑞吉外卖】day04:员工分页查询、启用/禁用员工账号、编辑员工信息
- MySQL 高级知识【 MyISAM 读锁写锁限制】
- Tp5 in cache cache, storage cell phone text message authentication code
- 获取本周的开始时间
猜你喜欢
Excel 2013 下拉为“快速分拆”调整为“填充序号”
51nod 2882最短路 (树链剖分)
关于notepad++的js,xml插件安装
2022牛客多校六 B-Eezie and Pie (dfs)
循环神经网络实现股票预测
Risk Control Modeling 1: Definition of Good and Bad Labels
Qt入门(四)——连续播放图片(两种定时器的运用)
2022杭电多校六 1006-Maex (树形DP)
(2022牛客多校四)H-Wall Builder II(思维)
2021 RoboCom 世界机器人开发者大赛-本科组(决赛)7-4猛犸不上 Ban(最短路)
随机推荐
(2022杭电多校五)1010-Bragging Dice (思维)
【深度学习】TensorFlow学习之路三:梯度消失\爆炸及解决办法
C语言中指针的介绍
洛谷P4197 Peaks 线段树合并
域前置通信过程和溯源思路
【CUDA】version switch freely
神经网络学习笔记(1)
【LaTex异常与错误】 - 公式编号的参考引用命令\eqref发生错误Undefined control sequence——可能是因为没加载宏包amsmath
启牛商学院靠不靠谱呢?证券账户开了安全吗
ABP中的数据过滤器
获取当前一周时间 不含当天
关于vm虚拟机虚拟网络已禁用
弹出PopupWindow后让背景变暗的方法
考证必看 | PMP扫盲贴+PMP材料
【瑞吉外卖】day04:员工分页查询、启用/禁用员工账号、编辑员工信息
机器学习建模高级用法!构建企业级AI建模流水线
Qt入门(四)——连续播放图片(两种定时器的运用)
并发编程第5篇,Synchronized的原理
MySQL 原理与优化,Group By 优化 技巧
风控建模一:好坏标签定义