[wiki] [sites] [slstatus][patch][kanji] major bug fix || Madison Lynch

From: <git_AT_suckless.org>
Date: Sun, 26 Feb 2023 18:51:35 +0100

commit 4c7492e96ff6c05a059e34620a0925fc5c1d7c2a
Author: Madison Lynch <madi_AT_mxdi.xyz>
Date: Sun Feb 26 11:51:03 2023 -0600

    [slstatus][patch][kanji] major bug fix

diff --git a/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji.diff b/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji.diff
index 538e7adc..b5e1cce5 100644
--- a/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji.diff
+++ b/tools.suckless.org/slstatus/patches/kanji/slstatus-kanji.diff
_AT_@ -16,13 +16,13 @@
 +
 +const char *
 +kanji(const char *unused) {
-+ char *kanji[]={"月","火","水","木","金","土","日"};
++ char *kanji[]={"日","月","火","水","木","金","土"};
 + int map[]={0,3,2,5,0,3,5,1,4,6,2,4};
 + time_t t=time(NULL);
 + struct tm tm=*localtime(&t);
 + int m=tm.tm_mon+1,y=tm.tm_year+1900-(m<3);
 + int wd=(y+y/4-y/100+y/400+map[m-1]+tm.tm_mday)%7;
-+ return kanji[wd-1];
++ return kanji[wd];
 +}
 --- a/Makefile
 +++ b/Makefile
Received on Sun Feb 26 2023 - 18:51:35 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 26 2023 - 19:00:52 CET