tags: vue uni-app javascript elementui Development language
function addTime(strDate,strFlag,value){
if(strFlag=="H")
{
value = value *60*60
}
else if(strFlag=="D")
{
value = value*60*60*24
}
var datacurpar = date.parse (new date (strdate))/1000; // convert to a timestamp
datacurpar = datacurpar + value; // Time stamp after 5 days
var datadefpar = new date (PARSEINT (datacurpar) * 1000); // Convert to time
var year = dataDefPar.getFullYear()
var month = dataDefPar.getMonth() + 1
var month = month<10? "0"+month : month
var Day = dataDefPar.getDate()<10? "0"+dataDefPar.getDate():dataDefPar.getDate()
var Hours = dataDefPar.getHours()>=10?dataDefPar.getHours():"0"+dataDefPar.getHours()
var Minutes = dataDefPar.getMinutes()>=10?dataDefPar.getMinutes():"0"+dataDefPar.getMinutes()
var Seconds = dataDefPar.getSeconds()>=10?dataDefPar.getSeconds():"0"+dataDefPar.getSeconds()
var dataDef = year+ '-' + month + '-' + Day+" "
+Hours+":"+Minutes+":"+Seconds
return dataDef
}
Bit operation Position and (&) It's true, the rest is false Application: judge the strange puppet The binary of the binary binary is 1, the even number is 0, and the bit and operation of the 1 are...
As shown in the figure above: When I chose "within one week", I had to intercept the time within the seven days of the current time (the seven days today is the start time, and the end time ...
Add and Sub usage in the time package, Add is used to calculate the time before and after a certain time, Sub is used to calculate two time differences ...
The result of the calculation is not a data that can be used for calculation and cannot be used for direct time conversion. 1、UNIX_TIMESTAMP The result is seconds, which can be used to calculate the y...
1, function: ADD_MONTHS (DATE, INTEGER) -- plus the specified time plus the time after months E.g: 2. Add or subtract SYSDATE for one time. E.g: In the same way, if it is minus (-), it is time to push...
addition: Subtraction: Reverse operation required...
There are many methods of time calculation in java, I think the best one is this one: ok. OutputresultDate6It's the time you want ...