Adding get_term_by_date to sws's term.

Making it so applications can get a term for an arbitrary date, rather depending on the current term.