This commit is contained in:
bridge
2025-08-23 21:45:05 +08:00
parent f72bccf0d3
commit a94ea2bd8b
10 changed files with 353 additions and 56 deletions

View File

@@ -1,6 +1,4 @@
from enum import Enum
from dataclasses import dataclass
class Month(Enum):
JANUARY = 1
@@ -16,6 +14,12 @@ class Month(Enum):
NOVEMBER = 11
DECEMBER = 12
def __str__(self) -> str:
return str(self.value)
def __repr__(self) -> str:
return str(self.value)
class Year(int):
def __add__(self, other: int) -> 'Year':
return Year(int(self) + other)