diff --git a/bashrc b/bashrc index 5d4bc2d..c79dbc0 100644 --- a/bashrc +++ b/bashrc @@ -10,9 +10,9 @@ function show_date() { # Define the dot file to store the selected adjective dotfile="$HOME/.adjective_of_the_day" - # Check if the dot file exists and was modified less than 1 day ago + # Check if the dot file exists and was modified since yesterday if [[ -f "$dotfile" && $(date -d "$(stat -c %y "$dotfile")" +%s) -ge $(date -d 'yesterday' +%s) ]]; then - # If the dot file exists and was modified less than 1 day ago, + # If the dot file exists and was modified since yesterday # read the stored adjective from the file selected_adjective=$(cat "$dotfile") else