2011-04-07 50 views
0

如何在MacOSX bash環境中本地化日期命令的輸出? 例如,我想本地化ru_RU區域以下:`日期`命令的本地化輸出

$ date +"%d %B %Y" 
07 April 2011 
+0

[強制「日期」使用比機器默認的區域設置(HTTP的可能的複製://stackoverflow.com/questions/12896509/forcing-date-to-use-a-locale-other-than-the-machine-default) – 2016-03-28 22:53:12

回答

1

你能試試嗎?

LC_ALL=ru_RU date +"%d %B %Y" 
+0

謝謝,那是 – user478681 2011-04-07 16:24:44

0

我沒有安裝ru_RU,所以我去/我們展示了它:

env LC_ALL=en_US.utf8 date +"%d %B %Y" -d +2months 
> 07 June 2011 
env LC_ALL=de_DE.utf8 date +"%d %B %Y" -d +2months 
> 07 Juni 2011