From 40a974cc6f0775a3781f4f2f5affac0ed306baf2 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 31 Oct 2024 09:42:56 +0100 Subject: [PATCH] fix quote for last day of month --- quotes/quotes.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/quotes/quotes.go b/quotes/quotes.go index 525a01a..e2c4313 100644 --- a/quotes/quotes.go +++ b/quotes/quotes.go @@ -5,29 +5,29 @@ import "time" func GetQuote(date time.Time) string { switch date.Month() { case time.January: - return january[date.Day()] + return january[date.Day()-1] case time.February: - return february[date.Day()] + return february[date.Day()-1] case time.March: - return march[date.Day()] + return march[date.Day()-1] case time.April: - return april[date.Day()] + return april[date.Day()-1] case time.May: - return may[date.Day()] + return may[date.Day()-1] case time.June: - return june[date.Day()] + return june[date.Day()-1] case time.July: - return july[date.Day()] + return july[date.Day()-1] case time.August: - return august[date.Day()] + return august[date.Day()-1] case time.September: - return september[date.Day()] + return september[date.Day()-1] case time.October: - return october[date.Day()] + return october[date.Day()-1] case time.November: - return november[date.Day()] + return november[date.Day()-1] case time.December: - return december[date.Day()] + return december[date.Day()-1] } return "" }