Under New York Penal Law Section 70.06, to be considered a “second felony offender” the accused must have a prior felony conviction in the past ten years. If the accused was incarcerated or on probation, the ten years begins from the completion of incarceration. If, on the other hand, the accused served jail time for a misdemeanor conviction this would not apply, and while a judge or prosecutor may consider the misdemeanor in relation to sentencing, under the letter of the law, the misdemeanor will not impact your sentence. However, as is often the case, the letter of the law is not what rules the day.
One other final point concerns the crime and the jurisdiction where the crime was committed. Under New York Penal Law Section 70.06, the previous conviction “must have been in [NY] of a felony, or in any other jurisdiction of an offense for which a sentence to a term of imprisonment in excess of one year or a sentence of death was authorized and is authorized in this state irrespective of whether such sentence was imposed.”