dateObject.setUTCMinutes( minutesValue )メソッドは、Dateオブジェクトの協定世界時に基づく日時の何分かを設定するメソッド。
構文
dateObject.setUTCMinutes( minutesValue )
引数
- minutesValue
- Dateオブジェクトの協定世界時に基づく日時の分を、「0~59」の数値で指定する。
サンプル
<script type="text/javascript">
var $dateObject = new Date( "2013-05-03T13:25:30" );
document.write( $dateObject.getUTCFullYear() + '年' );
document.write( $dateObject.getUTCMonth()+1 + '月' );
document.write( $dateObject.getUTCDate() + '日' );
document.write( $dateObject.getUTCHours() + '時' );
document.write( $dateObject.getUTCMinutes() + '分' );
document.write( $dateObject.getUTCSeconds() + '秒<br />' );
$dateObject.setUTCMinutes( 18, 59 );
document.write( '「$dateObject.setUTCMinutes( 18, 59 )」で何分かを設定すると、<br />' );
document.write( $dateObject.getUTCFullYear() + '年' );
document.write( $dateObject.getUTCMonth()+1 + '月' );
document.write( $dateObject.getUTCDate() + '日' );
document.write( $dateObject.getUTCHours() + '時' );
document.write( $dateObject.getUTCMinutes() + '分' );
document.write( $dateObject.getUTCSeconds() + '秒<br />' );
</script>
var $dateObject = new Date( "2013-05-03T13:25:30" );
document.write( $dateObject.getUTCFullYear() + '年' );
document.write( $dateObject.getUTCMonth()+1 + '月' );
document.write( $dateObject.getUTCDate() + '日' );
document.write( $dateObject.getUTCHours() + '時' );
document.write( $dateObject.getUTCMinutes() + '分' );
document.write( $dateObject.getUTCSeconds() + '秒<br />' );
$dateObject.setUTCMinutes( 18, 59 );
document.write( '「$dateObject.setUTCMinutes( 18, 59 )」で何分かを設定すると、<br />' );
document.write( $dateObject.getUTCFullYear() + '年' );
document.write( $dateObject.getUTCMonth()+1 + '月' );
document.write( $dateObject.getUTCDate() + '日' );
document.write( $dateObject.getUTCHours() + '時' );
document.write( $dateObject.getUTCMinutes() + '分' );
document.write( $dateObject.getUTCSeconds() + '秒<br />' );
</script>
↓↓↓出力結果↓↓↓