Encapsulate a timestamp
Main application: update blogs, comments, etc. with time at the end
div>
p>
Encapsulate a timestamp
Main application: update blogs, comments, etc. with time at the end
div>
p>
function dateStr(d,sign){
if(!sign){
sign=’-‘
}else{
sign = sign;
}
let year = d.getFullYear (),
month = d.getMonth()+1,
day = d.getDate(),
hours = d.getHours(),
minutes = d.getMinutes(),
seconds = d.getSeconds();
return year + sig n + mendZero(month) + sign + mendZero(day) +’ ‘
+ mendZero(hours)+sign + mendZero(minutes) + sign + mendZero(seconds) ;
}
String zero padding
function mendZero(num){
return num = num <10? '0' + num: num;
}
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2822 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC