>>983 Ruby
def s2d( str )
return '' unless /(\d+)-(\d+),第(\d+)(.)曜日/ =~ str
tm = Time.new( $1.to_i, $2.to_i, 1, 12 )
( tm + 86400 * ( $3.to_i * 7 - 7 + ("日月火水木金土".index($4) - tm.wday) % 7 ) ).strftime( '%F' )
end

puts s2d( '2021-07,第3月曜日' ) #=> 2021-07-19
閏秒やサマータイムを挟んでもおそらく問題ない