Momentjs-seconds
提供:Dev Guides
MomentJS-秒
このメソッドは、継続時間の秒数を示します。 返される値は0〜59です。 その期間の適切な秒数が必要な場合は、* moment.duration()。asSeconds()。*を使用してください。
構文
moment.duration().seconds();
moment.duration().asSeconds();
例
var a = moment.duration(20000).seconds();
出力
あなたが期間の秒の長さを表示したい場合は、次のようにmoment.duration()。asSeconds()を使用してください-
例
var a = moment.duration(600).asSeconds();