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
精彩评论