If you never signed a written lease for a definite term, then you are a month-to-month tenant on an oral (unwritten) lease; you can move out on a month's notice (or move out and pay a month's worth of rent). It doesn't matter that the person you sublet from signed a year-long lease--that is his obligation not yours, and is between him and his landlord. Your only obligation is the one *you* entered into, which since it is an oral lease, is a month-to-month obligation.