当前位置:网站首页>Time processing logic for the last 7 days, the last 10 days, and the last 90 days
Time processing logic for the last 7 days, the last 10 days, and the last 90 days
2022-06-11 16:09:00 【imkaifan】
// Get and format time parameters
getTimeParams(t) {
let endDate = new Date();
let startDate = new Date(endDate.getTime() - (t * 24 * 60 * 60 * 1000));
let startYear = startDate.getFullYear();
let endYear = endDate.getFullYear();
let startMonth = (startDate.getMonth() + 1) < 10 ? `0${
startDate.getMonth() + 1}` : (startDate.getMonth() + 1);
let endMonth = (endDate.getMonth() + 1) < 10 ? `0${
endDate.getMonth() + 1}` : (endDate.getMonth() + 1);
let startDay = startDate.getDate() < 10 ? `0${
startDate.getDate()}` : startDate.getDate();
let endDay = endDate.getDate() < 10 ? `0${
endDate.getDate()}` : endDate.getDate();
this.timeQuery.beginTime = `${
startYear}-${
startMonth}-${
startDay}T00:00:00+08:00`;
this.timeQuery.endTime = `${
endYear}-${
endMonth}-${
endDay}T23:59:59+08:00`;
},
边栏推荐
- Basic SQL statement - delete / update
- Yef 2022 opened yesterday. The whole process of free live broadcast on multiple network platforms opened an online technology feast!
- CLP information - No. 1 central document on Strengthening Rural Revitalization financial services
- [digital signal processing] correlation function (correlation function property | conjugate symmetry property of correlation function | even symmetry of real signal autocorrelation function | conjugat
- Overview and operation of database dense equivalent query
- postgresql源码编译
- [Yugong series] June 2022 Net architecture class 076- execution principle of distributed middleware schedulemaster
- How to optimize the performance of compose? Find the answer through "underlying principles" | developers say · dtalk
- Princeton Dengjia student's personal account: must I have a doctorate? No, I can also be an applied scientist in a large factory as an undergraduate
- Using cloud DB to build app quick start -server
猜你喜欢

Take you in-depth understanding of AGC cloud database

书籍《阅读的方法》读后感

【愚公系列】2022年06月 .NET架构班 076-分布式中间件 ScheduleMaster的执行原理

From repeatedly rejected manuscripts to post-90s assistant professor, Wang Hao of Rutgers University: curiosity drives me to constantly explore

After reading the book reading methods

DHCP protocol instantiation analysis

Nat Common | le Modèle linguistique peut apprendre des distributions moléculaires complexes

Opengauss database JDBC environment connection configuration (eclipse)

【愚公系列】2022年06月 .NET架构班 079-分布式中间件 ScheduleMaster的集群原理

Using cloud DB to build apps quick start - quick games
随机推荐
postgresql创建数据库
Overview and operation of database dense equivalent query
TC8:UDP_MessageFormat_01-02
Collection | can explain the development and common methods of machine learning!
[digital signal processing] correlation function (correlation function property | conjugate symmetry property of correlation function | even symmetry of real signal autocorrelation function | conjugat
Database resource load management (Part 1)
Nat Commun|語言模型可以學習複雜的分子分布
Production problem troubleshooting reference
GO语言-值类型和引用类型
What happened to the frequent disconnection of the computer at home
Discussion on opengauss parallel decoding
推开混合云市场大门,Lenovo xCloud的破局之道
让快递快到来不及退款的,真的不是人
Open the door of the hybrid cloud market, Lenovo xcloud's way to break the situation
With an average annual salary of 20W, automated test engineers are so popular?
面试经典题目:怎么做的性能测试?【杭州多测师】【杭州多测师_王sir】
postgresql源码编译
Opengauss version 3.0.0 was officially released, and immediately experience the first lightweight version in the community
Learn automatic testing of postman interface from 0 to 1
网站上的 breadcrumb 使用场景浅析