当前位置:网站首页>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;},
边栏推荐
猜你喜欢
Risk Control Modeling 1: Definition of Good and Bad Labels
关于vm虚拟机虚拟网络已禁用
linux环境安装mysql和使用中的常见问题
freemarker的基本语法及入门基础
Qt入门(四)——连续播放图片(两种定时器的运用)
LightningChart .NET 10.3.2 Crack 支持旧项目直接升级
(2022杭电多校五)1010-Bragging Dice (思维)
Modal dialog is used to implement the sign-in
WeChat applet wx:for loop output example
Introduction to basic grammar and the foundation of freemarker
随机推荐
2022杭电多校五 C - Slipper (dijkstra+虚拟结点)
2022杭电多校六 1009-Map (巴那赫不动点)
洛谷P4197 Peaks 线段树合并
13 Spark on RDD 全局累加器
2022牛客多校六 J-Number Game(简单推理)
(2022杭电多校四)1011-Link is as bear(思维+线性基)
51nod2614 小B爱旅行 (参考范艺杰代码 基本抄袭 太难了)
并发编程第4篇,锁的分类
04 Spark on 读取外部数据分区策略(源码角度分析)
并发编程第5篇,Synchronized的原理
php convert timestamp to just, minutes ago, hours ago, days ago format
并发编程第10篇,CountDownLatch(计数器)和Semaphore(信号量)
postgresql源码学习(35)—— 检查点⑤-检查点中的XLog清理机制
2022牛客多校六 M-Z-Game on grid(动态规划)
redis集群三主三从redis-cli
[YOLOv5] 6.0 environment construction (updated from time to time)
力扣每日一题-第50天-383. 赎金信
freemarker的基本语法及入门基础
Share | design based on MCU P0 mouth to drive the LED flashing
TensorFlow learning path deep learning 】 【 3: gradient disappear \ explosion and solution