From 9b448dac6aa2f944c93ab08ea89bbc1ee51e1ed2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 23 Dec 2016 23:49:53 +1100 Subject: [PATCH] Date: Simplify math --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index b623db35..42ccfe24 100755 --- a/neofetch +++ b/neofetch @@ -3018,8 +3018,8 @@ convert_time() { # Calculate day of week. # Source: http://blog.artofmemory.com/how-to-calculate-the-day-of-the-week-4203.html - year_code="$((${year/??} + $((${year/??} / 4)) % 7))" - week_day="$(($((year_code + month_code + 6 + day - ${leap_code:-0})) % 7))" + year_code="$((${year/??} + (${year/??} / 4) % 7))" + week_day="$(((year_code + month_code + 6 + day - leap_code) % 7))" case "$week_day" in 0) week_day="Sun" ;;