With JSP/JSTL there is the tag <fmt:formatDate> to format dates according to the current locale. With Sightly there is currently not such an extension and also custom extensions are not supported (see questions at http://dev.day.com/content/ddc/en/gems/introduction-to-sightly/_jcr_content/par/download_0/file.res/...). What should we do to do date formatting properly. I don't want to do the formatting in my model class because that is clearly functionality belonging to the view.
Can't you just create a reusable function in the Use API. You could create a JavaScript file or Java class and then pass in the data and the format String as parameters just as you would with <fmt:formatDate>.
Can't you just create a reusable function in the Use API. You could create a JavaScript file or Java class and then pass in the data and the format String as parameters just as you would with <fmt:formatDate>.