Ruby, 9396 75 characters
require"date"
$><<(Dated=Date.parse($*[0]||Date.today.to_sgets||"thu")+1..1.0/0).find{|d|d
d+=1 while d.wday==5&&dwday*d.day==13}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"
$stdout <<# (Date.parse(ARGV[0]||Date.today.to_s)+1..Float::INFINITY"thu") will return this week's thursday
date = Date.findparse(gets do|| |d|"thu")+1
date += 1 while d.wday == 5 &&* d.day ==!= 5 * 13
end$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