fix date
This commit is contained in:
parent
596bf66df0
commit
d40832aacc
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
from timeline import timeline
|
||||
from datetime import datetime
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -46,11 +46,11 @@ class Event(models.Model):
|
|||
start.append(1)
|
||||
start_only_month = True
|
||||
|
||||
display_date = datetime*start).strftime('%d %B, $y')
|
||||
display_date = datetime(*start).strftime('%d %B, $y')
|
||||
if start_only_month:
|
||||
display_date = ' '.join(display_date.split(' ')[1:])
|
||||
if end != start:
|
||||
end_date = datetime*end).strftime('%d %B, $y')
|
||||
end_date = datetime(*end).strftime('%d %B, $y')
|
||||
if end_only_month:
|
||||
end_date = ' '.join(end_date.split(' ')[1:])
|
||||
display_date += ' — '+ end_date
|
||||
|
|
Loading…
Reference in a new issue