Tag Archives: Waktu

Program JavaScript untuk Membuat Penghitung Waktu Mundur

Contoh: Buat Penghitung Waktu Mundur // program to create a countdown timer // time to countdown from (in milliseconds) let countDownDate = new Date().getTime() + 24 * 60 * 60 * 1000; // countdown timer let x = setInterval(function() { // get today’s date and time in milliseconds let now = new Date().getTime(); // find […]

Program JavaScript untuk Menampilkan Tanggal dan Waktu

Contoh : Tampilan Tanggal dan Waktu // program to display the date and time // get date and time const date = new Date(2017, 2, 12, 9, 25, 30); // get the date as a string const n = date.toDateString(); // get the time as a string const time = date.toLocaleTimeString(); // display date console.log(‘Date: […]

Program C ++ untuk Menghitung Perbedaan Antara Dua Periode Waktu

Contoh: Program ke Perbedaan Waktu // Computes time difference of two time period // Time periods are entered by the user #include using namespace std; struct TIME { int seconds; int minutes; int hours; }; void computeTimeDifference(struct TIME, struct TIME, struct TIME *); int main() { struct TIME t1, t2, difference; cout > t1.minutes >> […]