Momentjs-get-unit-of-time

提供:Dev Guides
移動先:案内検索

MomentJS-時間単位の取得

これは、すべての* duration()。hours()、duration()。minutes()*などの代替方法です。

構文

duration.get('hours');
duration.get('minutes');
duration.get('seconds');
duration.get('milliseconds');

var d = moment.duration(500, 'hours').get('hours');

出力

時間の単位