跳转到主要内容

xml_format

警告

此功能已棄用。

Description

一个日期对象会被转换成符合特定模板的字符串。此模板主要用于将数据发送回服务器时的格式化。

xml_format: (date: Date) => string

Parameters

  • date - (required) Date - 需要格式化的日期对象

Returns

  • text - (string) - 日期的字符串表示形式

Example

var cfg = scheduler.config;
var date_to_str = scheduler.date.date_to_str(cfg.xml_date, cfg.server_utc);

scheduler.templates.xml_format = function(date){
return date_to_str(date);
};

Details

注释

此模板已被废弃。请参考 format_date 替代:

var dateToStr = scheduler.date.date_to_str("%Y-%m-%d %H:%i");
scheduler.templates.format_date = function(date){
return dateToStr (date);
};

Change log

  • 自 v5.2 起废弃
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.