xdan/flipcountdown jquery 插件中两个日期之间的差异倒计时
Countdown by difference between two date in xdan/flipcountdown jquery plugin
我正在使用 xdan-flipcountdown jquery 插件作为计数器。
我有两个日期变量:
start_date=1396-10-04
end_date=1396-10-08
我想计算两个日期变量之间的差异并倒数它的值
我使用这样的方法:
$(".timer").flipcountdown({
size:'sm',
beforeDateTime: end_date
});
但是没有用?
我怎样才能计算差异,然后倒数它的差异?
我解决了 this.i 使用 JDateTime php class 然后将 shamsi 日期转换为公历 date.then 使用:
$(this).flipcountdown({
size:'sm',
beforeDateTime: $(this).attr('data-time-end')
});
它 works.sorry 慢慢来 :)
我正在使用 xdan-flipcountdown jquery 插件作为计数器。 我有两个日期变量:
start_date=1396-10-04
end_date=1396-10-08
我想计算两个日期变量之间的差异并倒数它的值 我使用这样的方法:
$(".timer").flipcountdown({
size:'sm',
beforeDateTime: end_date
});
但是没有用? 我怎样才能计算差异,然后倒数它的差异?
我解决了 this.i 使用 JDateTime php class 然后将 shamsi 日期转换为公历 date.then 使用:
$(this).flipcountdown({
size:'sm',
beforeDateTime: $(this).attr('data-time-end')
});