This is the server side problem it seems that Expression.SentBefore doesn't work correctly on Yahoo IMAP server.
IMAP protocol equivalent of this expression is SENTBEFORE. It examines email's Date: header.
It appears that although SENTSINCE doesn't work, SENTSINCE (Expression.SentSince), BEFORE (Expression.Before) and SINCE (Expression.Since) do work correctly. BEFORE and SINCE use email's INTERNALDATE recorded by the IMAP server instead of Date: header.
9823377aae664ac5 UID FETCH 14614 (UID INTERNALDATE ENVELOPE)
* 1 FETCH (UID 14614 INTERNALDATE "13-Jun-2014 15:02:08 +0000" ENVELOPE ("Fri, 13 Jun 2014 15:02:08 +0000" "test2" NIL NIL NIL NIL NIL NIL NIL NIL))
a7047b7ae00645ae UID SEARCH BEFORE 14-Jun-2014
* SEARCH 14614
a7047b7ae00645ae OK UID SEARCH completed
66bfcdbe65894e4c UID SEARCH SENTBEFORE 14-Jun-2014
* SEARCH
66bfcdbe65894e4c OK UID SEARCH completed
The fact is that Yahoo IMAP implantation is buggy. Once, the server assigned "17-Jan-1970 05:37:46 +0000" as an INTERNALDATE to one of my emails, just to change that on the next login.