「時間」変数を使用している「スケジュールされた時間」と呼ばれる特定の列を持つデータテーブルがあります。テーブルのスケジュールされた時間をシステム時間と比較する最も簡単な方法を知りたいです。その代わりに、行の背景色を変更します。
これまでの私のコード
var currentTime = new Date(); /* not sure if this is the correct time object to use */
var scheduledTime = scheduledTime();
if (scheduledTime >= 15mins) {
return 'background-color:red;'
} else if (scheduledTime > 15mins <= 30mins) {
return 'background-color:yellow;'
} else if (scheduledTime > 30mins <= 2hours) {
return 'background-color:green;'
} else if (scheduledTime > 2hours) {
return 'background-color:none;
}