Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: ztrftime: Pass everything unhandled to the system strftime()



V09datetime fails on Mac OS X, because the OS does not
support "%04y" nor "%Ey" but only skip_extensions is set.

mac% strftime %04y 1
4y
mac% LC_TIME=ja_JP.UTF-8 strftime %OS 1
01

I think these two skip_* need be set independently.


diff --git a/Test/V09datetime.ztst b/Test/V09datetime.ztst
index a7ef983..475adde 100644
--- a/Test/V09datetime.ztst
+++ b/Test/V09datetime.ztst
@@ -8,13 +8,8 @@
   unset LC_ALL
   LC_TIME=C
   TZ=UTC+0
-  if [[ "$(strftime %04y 1)" = "0070" ]]; then
-    [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || {
-      skip_japanese=1
-    }
-  else
-    skip_extensions=1
-  fi
+  [[ "$(strftime %04y 1)" = "0070" ]] || skip_extensions=1
+  [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || skip_japanese=1
 
 %test
 




Messages sorted by: Reverse Date, Date, Thread, Author