update code

pull/1314/head
sight 2023-08-06 23:18:07 +08:00
parent 4fba81d3a3
commit ba806543a5
2 changed files with 2 additions and 6 deletions

View File

@ -134,11 +134,7 @@ layui.use(['util', 'layer'], function(){
var timer = null
if (timer) clearInterval(timer)
var toDateString = function (format) {
var dateString = util.toDateString(new Date(), format, {customMeridiem: function(hours, minutes){
return (hours < 12 ? 'AM' : 'PM')
//.split('').join('.') // 有句点 '.'
//.toLowerCase() // 小写
}});
var dateString = util.toDateString(new Date(), format);
$('#test3').html(dateString)
}
timer = setInterval(() => {

View File

@ -293,7 +293,7 @@ layui.define('jquery', function(exports){
return '晚上';
};
var meridiem = options.customMeridiem || defaultMeridiem;
var meridiem = (options && options.customMeridiem) || defaultMeridiem;
var matches = {
yy: function(){return String(years).slice(-2);},