Skip to content
Snippets Groups Projects
Verified Commit db79ecc5 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add string representation to week. Advances #27.

parent 9fd242f4
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ from typing import Optional, Sequence, Tuple
from django.apps import apps
from django.db import models
from django.utils.translation import ugettext as _
@dataclass
......@@ -29,6 +30,9 @@ class CalendarWeek:
if not self.week:
self.week = today.isoweekday()
def __str__(self) -> str:
return '%s (%s %s %s)' % (_('Kalenderwoche'), self[0], _('to'), self[-1])
def __len__(self) -> int:
return 7
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment