Deluge date time function fix
Dear Users,
Due to a number of complaints on date-time functions, we are rolling out a fix in a day or two which will establish the following behavior.
1).toString() applied to datetime value
a).<date/datetime>.toString() function on date/datetime will output date string in the format specified in the application setting.
b).If you want to override it, you can use <date/datetime>.toString("date format as string"). eg. toString("dd-MM-yyyy")
2).toDate() applied to string value
a). <string>.toDate() function will always parse the input string using the format specified in the application setting and will throw an error if it cannot convert the string to date.
b).If you want to override it, you can use <string>.toDate("date format as string"). eg. toDate("dd-MM-yyyy")
3).toTime() applied to string value
a). <string>.toTime() function will always parse the input string using the format specified in the application setting and will throw an error if it cannot convert the string to date-time.
b).If you want to override it, you can use <string>.toTime("date format as string"). eg. toTime("dd-MM-yyyy")
Previously, the toDate() and toTime() functions always expected the input string to be in the format "dd-MM-yyyy" irrespective of the application format. Now it has been changed to follow the application format.
This change in behavior will cause problem to users who have manually constructed the string in "dd-MMM-yyyy" format even when their application format was not in that format, so as to work around this issue. Those users have to modify their code in-order to function properly after this update.
Please get back to me for any clarification in this regards.
Thanks,
Hariharan