我正在编写一个javascript代码来解析XML文件中的事件并将其插入到Google日历中.我将常规UTC日期转换为Google日历DateTime格式时遇到问题.
我的日期以此格式(UTC)显示:
Mon Apr 02 2013 15:14:33 GMT+0300 (Arab Standard Time)
Run Code Online (Sandbox Code Playgroud)
虽然我想转换的格式是(rfc 3999):
2013-1-16T10:00:00.000-07:00
Run Code Online (Sandbox Code Playgroud)
我尝试使用date.format()或getDateTime()等方法,但它从未起作用
任何帮助是极大的赞赏