pub mod email;
pub mod manage_commands;
pub mod password_help;
pub mod token_generation;
pub mod event_planning_template;
mod application_error;

#[cfg(test)]
pub mod test_helper;

pub use application_error::ApplicationError;
use chrono::{NaiveDate, Utc};

pub fn get_return_url_for_date(date: &NaiveDate) -> String {
    let today = Utc::now().date_naive();
    if date == &today {
        return String::from("/");
    }

    format!("/?date={}", date)
}
