calendar imho doesn't need to setlocale(LC_TIME, ...)
before and after strftime(3), as LC_TIME is ignored.
Jan
Index: day.c
===================================================================
RCS file: /cvs/src/usr.bin/calendar/day.c,v
retrieving revision 1.34
diff -u -p -r1.34 day.c
--- day.c 14 Sep 2016 15:09:46 -0000 1.34
+++ day.c 10 Jan 2019 15:23:45 -0000
@@ -169,11 +169,7 @@ settime(time_t *now)
if (f_SetdayAfter)
offset = 0; /* Except not when range is set explicitly */
header[5].iov_base = dayname;
-
- (void) setlocale(LC_TIME, "C");
header[5].iov_len = strftime(dayname, sizeof(dayname), "%A", tp);
- (void) setlocale(LC_TIME, "");
-
setnnames();
}