Understanding photoperiodism