## Ruby, <s>96</s> 75 characters require"date" d=Date.parse(gets||"thu")+1 d+=1 while d.wday*d.day!=65 $><<d Takes the date from stdin. To not specify a date press ctrl-d. Thanks very much for Ventero's help. Ungolfed: require "date" # Date.parse("thu") will return this week's thursday date = Date.parse(gets || "thu")+1 date += 1 while d.wday * d.day != 5 * 13 $stdout << date Sample IO: $ ruby fr13th.rb 2013-05-09 2013-09-13 $ ruby fr13th.rb 2007-06-29 2007-07-13 $ ruby fr13th.rb 2007-07-13 2008-06-13 $ ruby fr13th.rb 2011-05-13