When in any law, or in any instrument in writing specifying a rate of interest, no period of time is mentioned for which such rate is to be calculated, it shall be deemed to be by the year.