Tips Buat Calender


Bagaimanakah cara membuat calander, agar kita bisa melihat tanggal, waktu ketika kita online di blog
var dayarray = new Array(“Minggu”,”Senin”,”Selasa”,”Rabu”,”Kamis”,”Jumat”,”Sabtu”);
var montharray = new Array(“Januari”,”Februari”,”Maret”,”April”,”Mei”,”Juni”,”Juli”,”Agustus”,”September”,”Oktober”,”November”,”Desember”);

var kursusblog = new Date();

var day = kursusblog.getDay();
var month = kursusblog.getMonth();
var daym = kursusblog.getDate();
var year = kursusblog.getFullYear();

var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()

if (minutes < 10)
minutes = "0" + minutes

if (daym < 10)
daym = "0" + daym;

document.write("Hari ini” + ” ” + dayarray[day] + “, ” + daym + ” ” + montharray[month] + ” ” + year);
document.write(“
“);
document.write(“Pukul” + ” ” + hours + “:” + minutes);

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s