def update(self):
self.canvas.delete("updates")
string1 = daysOfWeek[self.dateAndTime.weekday()] + ", " + months[self.dateAndTime.month] + " " + str(self.dateAndTime.day)
if TWENTY_FOUR_HOUR_CLOCK:
string2 = "{:02d}:{:02d}:{:02d}".format(self.dateAndTime.hour, self.dateAndTime.minute, self.dateAndTime.second)
else:
hour, suffix = toTwelveHourClock(self.dateAndTime)
string2 = "{:02d}:{:02d}:{:02d} {:s}".format(hour, self.dateAndTime.minute, self.dateAndTime.second, suffix)
self.canvas.create_text((self.width // 2, self.height * .30), text=string1, fill=fontColor, font=self.font, tags="updates")
self.canvas.create_text((self.width // 2, self.height * .70), text=string2, fill=fontColor, font=self.font, tags="updates")
评论列表
文章目录