Is it possible to display a global date in i18n? It’s easy to include a standard text or global text field in i18n. So far I’ve not succeeded in making a global date appear.
Here’s my unsuccessful coding:```
%%guserid$to_sec.user_name%%'s next scheduled call %%gnextcall$to_calls.calldate%%
```
Here’s an example of displaying a date as String, using the locale preference of the client
//create javascript date object
var dateObject = new Date()
//create a Locale Object from java, based on the user's locale setting
var currentLocale = new java.util.Locale(i18n.getCurrentLanguage());
//create the formatter object from java
var formatter = new java.text.SimpleDateFormat("EEE d MMM yy", currentLocale);
// use the .format method to return the formatted string
var result = formatter.format(dateObject);
maarten:
Here’s an example of displaying a date as String, using the locale preference of the client
//create javascript date object
var dateObject = new Date()
//create a Locale Object from java, based on the user’s locale setting
var currentLocale = new java.util.Locale(i18n.getCurrentLanguage());
//create the formatter object from java
var formatter = new java.text.SimpleDateFormat(“EEE d MMM yy”, currentLocale);
// use the .format method to return the formatted string
var result = formatter.format(dateObject);