]> granicus.if.org Git - neomutt/commitdiff
mutt_str_startswith - mutt/date.c
authorPietro Cerutti <gahr@gahr.ch>
Fri, 9 Nov 2018 16:01:23 +0000 (16:01 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 14 Nov 2018 15:10:31 +0000 (15:10 +0000)
mutt/date.c

index b066bedb115846fd93ec8f196e0dd82ee506768f..e09680b5a1e86936de87453db31ab92b0019c86e 100644 (file)
@@ -403,7 +403,7 @@ char *mutt_date_make_date(char *buf, size_t buflen)
 int mutt_date_check_month(const char *s)
 {
   for (int i = 0; i < mutt_array_size(Months); i++)
-    if (mutt_str_strncasecmp(s, Months[i], 3) == 0)
+    if (mutt_str_startswith(s, Months[i], CASE_IGNORE))
       return i;
 
   return -1; /* error */
@@ -423,7 +423,7 @@ bool mutt_date_is_day_name(const char *s)
     return false;
 
   for (int i = 0; i < mutt_array_size(Weekdays); i++)
-    if (mutt_str_strncasecmp(s, Weekdays[i], 3) == 0)
+    if (mutt_str_startswith(s, Weekdays[i], CASE_IGNORE))
       return true;
 
   return false;