I am using date module & date repeat API but now i want to change repeat date format.Now repeat date is display in "Repeats 5 days " but i want to show only "5 days " instead of "Repeats 5 days"
Similar question was raised before. There is still no way to override the format of the Repeat rule via theme functions. The answer that was given for the linked question provides a possible workaround (quoted below).
you may override
theme_date_repeat_field()
, which callsdate_repeat_rrule_description()
. You could call your own version of that function to customize the display.This would leave the contrib modules untouched, but you would be duplicating some effort and have more code to maintain.
There is an active issue for Date Repeat sub-module - Make Repeat Date Format/Display More Flexible which did not receive enough attention.
You can also patch the date_repeat.module
directly and keep track of it during updates, but that is obviously not a desired way to go about this.
The function that constructs the output of the string you need to change is
function date_repeat_rrule_description()
check $output
variable - that is what you are trying to modify.