mirror of https://github.com/layui/layui
update code
parent
4fba81d3a3
commit
ba806543a5
|
@ -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(() => {
|
||||
|
|
|
@ -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);},
|
||||
|
|
Loading…
Reference in New Issue