Option to pass period as a proc