diff --git a/journals/models.py b/journals/models.py index c8accb008ebe2282920f886fc87b3509a1a38f67..6ec91dd1d16be97571fb592f0becbbabc22563fd 100644 --- a/journals/models.py +++ b/journals/models.py @@ -61,7 +61,7 @@ class Journal(models.Model): for pub in pubs: if pub.citedby and pub.latest_citedby_update: ncites += len(pub.citedby) - deltat += (pub.latest_citedby_update - pub.publication_date).seconds + deltat += (pub.latest_citedby_update.date() - pub.publication_date).days return (ncites * 3600 * 24 * 365.25/deltat) @@ -93,8 +93,8 @@ class Volume(models.Model): for pub in pubs: if pub.citedby and pub.latest_citedby_update: ncites += len(pub.citedby) - deltat += (pub.latest_citedby_update - pub.publication_date).seconds - return (ncites * 3600 * 24 * 365.25/deltat) + deltat += (pub.latest_citedby_update.date() - pub.publication_date).days + return (ncites * 365.25/deltat) class Issue(models.Model): @@ -157,7 +157,7 @@ class Issue(models.Model): for pub in pubs: if pub.citedby and pub.latest_citedby_update: ncites += len(pub.citedby) - deltat += (pub.latest_citedby_update - pub.publication_date).seconds + deltat += (pub.latest_citedby_update.date() - pub.publication_date).days return (ncites * 3600 * 24 * 365.25/deltat) @@ -262,7 +262,7 @@ class Publication(models.Model): """ if self.citedby and self.latest_citedby_update: ncites = len(self.citedby) - deltat = (self.latest_citedby_update - self.publication_date).seconds + deltat = (self.latest_citedby_update.date() - self.publication_date).days return (ncites * 3600 * 24 * 365.25/deltat) else: return 0