method

change

rails latest stable - Class: ActiveSupport::CoreExtensions::DateTime::Calculations

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

change(options)
public

Returns a new DateTime where one or more of the elements have been changed according to the options parameter. The time options (hour, minute, sec) reset cascadingly, so if only the hour is passed, then minute and sec is set to 0. If the hour and minute is passed, then sec is set to 0.