Hi,
What do you mean by above statement. Do you want to show it on footer html ?
If you are trying to read the last modified date of footer node. Just add the below code in your footer component:
Last Updated on ${'dd-MM-yyyy' @ format=properties['jcr:lastModified']}
(or)
Last Updated on ${'dd-MM-yyyy HH:mm' @ format=properties['jcr:lastModified'], timezone='GMT+05:30'}
Go through this link as well : htl-spec/SPECIFICATION.md at master · Adobe-Marketing-Cloud/htl-spec · GitHub
Update:
The above code works on 6.3 but not on 6.2 .
You can do as below:
package com.project;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import com.adobe.cq.sightly.WCMUsePojo;
public class DateFormatter extends WCMUsePojo {
private String formattedDate;
@Override
public void activate() {
Calendar date = get("date", Calendar.class);
String format = get("format",String.class);
SimpleDateFormat formatter = new SimpleDateFormat(format);
formattedDate = formatter.format(date.getTime());
}
public String getFormattedDate() {
return formattedDate;
}
}
<sly data-sly-use.date="${'com.project.DateFormatter' @ date=properties['jcr:lastModified'],format='dd/MM/yyyy'}">
${date.formattedDate}
</sly>