我正在开发一个循环计时器,其中的代码与svg绘图相关。我目前有以下js代码。这会显示计时器从-1200开始计数到0,但不会显示"-“,所以看起来像是在倒计时。请谁能告诉我一种方法,使用相同的代码,但让它从20分钟,所以它看起来像是一个数字时钟?
var seconds = 1200; /* how long the timer runs for */
var initialOffset = '440';
var i = -1200;
var interval = setInterval(
function() {
$('.circle_animati
在Django模型中有两个datefield,即start_date和end_date。我想计算和存储两者之间的总天数,这将与每日费用一起使用,以返回总成本。
models.py
class Booking(models.Model):
"""Stores the bookings, for example when it was made, the booking date, and the car ID."""
# Unique ID for this booking.
start_date = models.Date