diff --git a/plugins/Templaters/db6edr_formatting_helper.rb b/plugins/Templaters/db6edr_formatting_helper.rb new file mode 100644 index 0000000..a7e6fbf --- /dev/null +++ b/plugins/Templaters/db6edr_formatting_helper.rb @@ -0,0 +1,15 @@ +class Ruhoh + module Templaters + module BaseHelpers + + # Render date in the format given in the date_format variable in config + def format_date(date) + newDate = DateTime.parse(date) + strftimeString=self.context['site']['config']['date_format'] + strftimeString ||="%F" + newDate.strftime(strftimeString) + end + end + end +end + \ No newline at end of file