比如今日是2012-04-22
$ date -d "+1 day" +%Y-%m-%d
2012-04-23
$ date -d "-1 day" +%Y-%m-%d
2012-04-21
$ date -d "2012-04-10 -1 day " +%Y-%m-%d
2012-04-09
$ date -d "2012-04-10 +1 day " +%Y-%m-%d
2012-04-11
$ date -d "-1 week " +%Y-%m-%d
2012-04-15
$ date -d "+1 week " +%Y-%m-%d
2012-04-29
$ date -d "+1 month " +%Y-%m-%d
2012-05-22
$ date -d "-1 month " +%Y-%m-%d
2012-03-22
$ date -d "-1 year " +%Y-%m-%d
2011-04-22
$ date -d "+1 year " +%Y-%m-%d
2013-04-22
posted on 2014-04-26 23:40
回忆之城 阅读(237)
评论(0) 编辑 收藏 引用 所属分类:
unix/linux