There 8 predefined methods for date formatting, which can be used to convert dates to strings and strings to dates
Convert dates to strings
var str1 = webix.i18n.dateFormatStr(date_obj); //date
var str2 = webix.i18n.longDateFormatStr(date_obj);//long date representation
var str3 = webix.i18n.timeFormatStr(date_obj); //time
var str4 = webix.i18n.fullDateFormatStr(date_obj);//date + time
var str5 = webix.i18n.parseFormatStr(date_obj); //used for date serialization
Convert strings to dates
var date1 = webix.i18n.dateFormatDate(string); //date
var date2 = webix.i18n.longDateFormatDate(string);//long date representation
var date3 = webix.i18n.timeFormatDate(string); //time
var date4 = webix.i18n.fullDateFormatDate(string);//date + time
var date5 = webix.i18n.parseFormatDate(string); //used for date parsing
Formats can be defined by locales to adapt numbers and dates to the target location.
If necessary you can create your own conversion methods
Custom date convert
var format = webix.Date.dateToStr("%Y.%m");
var string = format(new Date()); //2012.05
var parser = webix.Date.strToDate("%Y.%m");
var date = parser("2012.05");
For instance, "%d-%F-%Y,%D" will display the date as 11-September-2012, Tue.
strings like 20120502, where there are no separators between numbers, can't be parsed as dates