Living by the calendar: how plants know when to flower