User:ChaoticShadow/common.js

mw.loader.using( 'oojs-ui-core' ).done( function {	$( function  { function update(val) { $( '#result-oo' ).html(val); }		var input1 = new OO.ui.NumberInputWidget( {			min: 1,			max: 10,			step: 1		}); var input2 = new OO.ui.NumberInputWidget( {			min: 0,			max: 50,			step: 5		}); var val1 = 1; var val2 = 0; var sum = val1 + val2; input1.on('change', function(val) {			val1 = Number(val);			sum = val1 + val2;			update(sum);		}); input2.on('change', function(val) {			val2 = Number(val);			sum = val1 + val2;			update(sum);		}); $( '#test-oo' ).append(			input1.$element,			input2.$element		); }); });

var d1 = new Date("2021-07-18T20:59:59.000+09:00"); var d2 = new Date; var remDiff = d1 - d2; var days = Math.floor(remDiff / (1000*60*60*24)) remDiff = remDiff % (1000*60*60*24) var hours = Math.floor(remDiff / (1000*60*60)) remDiff = remDiff % (1000*60*60) var minutes = Math.floor(remDiff / (1000*60))