예제 #1
0
    def version_date(self):
        """Return the date of version.

        It is prefixed with "≈ " if the date is in the future.
        """
        try:
            if self.version.date > date.today():
                return '≈ %s' % localdate(self.version.date)
            return localdate(self.version.date)
        except:  # noqa: E722
            return ''
예제 #2
0
    def version_date(self):
        """Return the date of version.

        It is prefixed with "≈ " if the date is in the future.
        """
        try:
            release_date = Release.objects.get(version=self.version).date
            if release_date > date.today():
                return '≈ %s' % localdate(release_date)
            return localdate(release_date)
        except:
            return ''
예제 #3
0
파일: models.py 프로젝트: andir/weechat.org
    def version_date(self):
        """Return the date of version.

        It is prefixed with "≈ " if the date is in the future.
        """
        try:
            release_date = Release.objects.get(version=self.version).date
            if release_date > date.today():
                return '≈ %s' % localdate(release_date)
            return localdate(release_date)
        except:  # noqa: E722
            return ''
예제 #4
0
    def version_date(self):
        """Return the date of version.

        It is prefixed with "≈ " if the date is in the future.
        """
        try:
            if self.version.date > date.today():
                return f'≈ {localdate(self.version.date)}'
            return localdate(self.version.date)
        except:  # noqa: E722  pylint: disable=bare-except
            return ''
예제 #5
0
 def date_l10n(self):
     """Return the sponsor date formatted with localized date format."""
     return localdate(self.date)
예제 #6
0
 def date_l10n(self):
     """Return the info date formatted with localized date format."""
     return localdate(self.date)
예제 #7
0
 def release_date_l10n(self):
     """Return the release date formatted with localized date format."""
     return localdate(self.release_date)
예제 #8
0
 def release_date_l10n(self):
     """Return the release date formatted with localized date format."""
     return localdate(self.release_date)