A major complicating factor in constructing a perpetual calendar algorithm is the peculiar and variable length of February, which was at one time the "last" month of the year, leaving the first 11 months March through January with a five-month repeating pattern: 31, 30, 31, 30, 31, ..., so that the offset from March of the starting day of the week for any month could be easily determined.