Use Chrono for Date/Time to update Status #39

Closed
opened 2025-12-22 16:26:22 +00:00 by meraghon · 0 comments
meraghon commented 2025-12-22 16:26:22 +00:00 (Migrated from github.com)

Use dates set for DateRange to change status of Date element. Compare UTC date from server to users local date.

Upcoming - Can only display if Range enum is used. Displays when current date < start_date
Open - Displays when current date => start_date < end_date -5 days OR when current date < 'date' -5 days
Deadline - Displays 5 days before 'end_date' or 'date'
Closed - Displays when current date > 'end_date' or 'date'

In the case where the date-set status' above aren't applicable, add an additional enum option Other(String) with plain styling for the user to specify a status. This would override the function above.

Use dates set for DateRange to change status of Date element. Compare UTC date from server to users local date. Upcoming - Can only display if `Range` enum is used. Displays when current date < `start_date` Open - Displays when current date => `start_date` < `end_date` -5 days OR when current date < 'date' -5 days Deadline - Displays 5 days before 'end_date' or 'date' Closed - Displays when current date > 'end_date' or 'date' In the case where the date-set status' above aren't applicable, add an additional enum option `Other(String)` with plain styling for the user to specify a status. This would override the function above.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r15-software-dev/scholarships-rs#39