Skip to content

Commit

Permalink
Default date format is now ISO-8601
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Apr 4, 2024
1 parent 4b40e64 commit 1b99daf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'no.datek'
version '0.18.0'
version '0.18.1'
final String JRUBY_VERSION = '9.4.5.0';

repositories {
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/ruby/load_slim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
rescue Exception => e
Java::OrgApacheCommonsLogging::LogFactory.getLog('no.datek.slim').error(e.to_s)

def render_slim(template, model_map, rendering_context)
"<h1>Whoops!</h1><p>Failed to load SLIM template framework.</p>"
module SlimRenderer
def self.render(template, model_map, rendering_context)
"<h1>Whoops!</h1><p>Failed to load SLIM template framework.</p>"
end
end
end

2 changes: 1 addition & 1 deletion src/main/resources/ruby/slim_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def formatDateTime(date_time, format = 'yyyy-MM-dd HH:mm:ss', timeZoneId: TimeZo
DateUtils.formatLocalDateTime(local_date_time, format, timeZoneId)
end

def formatDate(date, format = '%d.%m.%Y')
def formatDate(date, format = '%Y-%m-%d')
if date.nil?
return ''
end
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ruby/slim_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require_relative 'request_context'
require 'application_setup'

class SlimRenderer
module SlimRenderer
extend LocaleHelper
extend ClassPatcher
include Log
Expand Down

0 comments on commit 1b99daf

Please sign in to comment.