Javascript には time の組み込み関数があります。
var date = new Date();
d.getHours() //gets the hour in integer 0-23
d.getMinutes() //gets the minute in integer 0-59
関数 (例: A()
) を 0:35 から 4:35 の間に実行したい
単純な論理演算 ( &&
、||
) だけでこれを行うことは可能ですか? 可能だとは思いませんが、それを実装するエレガントな方法を知りたかったのです。