This question already has answers here:
How to format a JavaScript date
                                
                                    (54个回答)
                                
                        
                                5年前关闭。
            
                    
在JavaScript中:

var todayDate = new Date();


如何将实际日期转换为这种格式(示例):

Mon Aug 25 2014

最佳答案

toDateString()为您提供确切的格式。

var todayDate = new Date();
todayDate.toDateString(); // "Thu Aug 14 2014"

10-08 02:41