如何在 Suitescript 中查找星期几

How to find day of week in Suitescript

嗨,我是 suitescript 的新手。我想从日期中找到星期几。有 API 吗?

像这样:

var d = new Date();
var n = d.getDay(); //Sunday is 0, Monday is 1, and so on