strava / utils.py
Gireg's picture
first commit
21d674f
raw
history blame contribute delete
299 Bytes
from datetime import datetime, timedelta
import streamlit as st
@st.cache_data
def find_default_publish_start_end_date():
today = datetime.now()
start = today - timedelta(days=today.weekday())
end = start + timedelta(days=6)
if end > today:
end = today
return start, end