summaryrefslogtreecommitdiff
path: root/date_service.py
diff options
context:
space:
mode:
Diffstat (limited to 'date_service.py')
-rw-r--r--date_service.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/date_service.py b/date_service.py
index 4a0706a..3c93546 100644
--- a/date_service.py
+++ b/date_service.py
@@ -32,30 +32,6 @@ class DateService:
raise ValueError(f"Unable to parse date string: {date_string}")
@staticmethod
- def qdate_to_datetime(qdate):
- """Convert QDate to datetime"""
- if isinstance(qdate, QDate):
- return datetime(qdate.year(), qdate.month(), qdate.day())
- return qdate
-
- @staticmethod
- def datetime_to_qdate(dt):
- """Convert datetime to QDate"""
- if isinstance(dt, datetime):
- return QDate(dt.year, dt.month, dt.day)
- return dt
-
- @staticmethod
- def validate_date_range(start_date, end_date):
- """Validate that start_date is not after end_date"""
- if isinstance(start_date, str):
- start_date = DateService.parse_date_from_string(start_date)
- if isinstance(end_date, str):
- end_date = DateService.parse_date_from_string(end_date)
-
- return start_date <= end_date
-
- @staticmethod
def calculate_days_between(start_date, end_date):
"""Calculate number of days between two dates"""
if isinstance(start_date, str):
@@ -89,17 +65,3 @@ class DateService:
def get_current_date():
"""Get current date as datetime"""
return datetime.now()
-
- @staticmethod
- def add_days_to_date(date, days):
- """Add days to a date"""
- if isinstance(date, str):
- date = DateService.parse_date_from_string(date)
- return date + timedelta(days=days)
-
- @staticmethod
- def add_months_to_date(date, months):
- """Add months to a date using relativedelta"""
- if isinstance(date, str):
- date = DateService.parse_date_from_string(date)
- return date + relativedelta(months=months)