开发者

Script that adds X days to a given date?

Can someone point me to or write a script/program that takes X days and adds that to a given day开发者_运维知识库 dd/mm/yy and outputs the date in dd/mm/yy format. Thanks!


In Ruby:

require 'rubygems'
require 'active_support'

def date_a(x, y)
  (Date.parse(x) + y.days).strftime("%d/%m/%y")
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜