Last active
March 11, 2016 10:01
-
-
Save madeingnecca/9f7bcabc00dd2b1d91e7 to your computer and use it in GitHub Desktop.
LIFERAY VELOCITY utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Print article date with a localized format. | |
############################################## | |
#set ($localeDefault = $localeUtil.getDefault()) | |
## Convert string (with a particular input format) to a Date object. | |
#set ($modifiedDate = $dateTool.toDate("EEE, dd MMM yyyy hh:mm:ss Z", $reserved-article-display-date.getData(), $localeDefault)) | |
## Get the localized format as a string. | |
#set ($dateFormat = "#language ('custom-medium-dateformat-pattern')") | |
$dateTool.format($dateFormat, $modifiedDate) | |
# Get current site name. | |
######################## | |
#set ($site_name = $themeDisplay.getLayout().getGroup().getName()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment