将倒数时间显示为H:M:S

时间:2019-11-16 08:59:57

标签: wordpress

如何显示从正常HMS到H:M:S(Wordpress拍卖插件)的倒计时时间安排

正常显示与这种风格相同[在这里照片] [1]

$( ".auction-time-countdown" ).each(function( index ) {
        var time    = $(this).data('time');
        var format  = $(this).data('format');

        if(format == ''){
            format = 'yowdHMS';
        }
        if(data.compact_counter == 'yes'){
            compact  = true;
        } else{
            compact  = false;
        }
        var etext ='';
        if($(this).hasClass('future') ){
            var etext = '<div class="started">'+data.started+'</div>';
        } else{
            var etext = '<div class="over">'+data.checking+'</div>';
        }

        if ( ! $(' body' ).hasClass('logged-in') ) {
            time = $.SAcountdown.UTCDate(-(new Date().getTimezoneOffset()),new Date(time*1000));
        }

        $(this).SAcountdown({
            until: time,
            format: format,
            compact:  compact,

            onExpiry: closeAuction,
            expiryText: etext
        });


  [1]: http://adnan-tech.com/tutorial/dynamic-countdown-timer-php

0 个答案:

没有答案