<!--mula script tarikh auto-->
<script language="JavaScript">
<!-- Begin
// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
// Join it all together
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
// Print out the data.
document.write("" +today+ "");
// End -->
</script>
<!--tamat script tarikh auto-->
1 Response
<div style="text-align: center;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: medium;"><span style="color: black;"><span style="font-family: "georgia" , "times new roman" , serif; font-weight: bold;">From :</span><span style="background-color: yellow; font-family: "times" , "times new roman" , serif;"><b>Ariffin Hamzah</b></span></span></span></div>
<div style="text-align: center;">
<span style="font-family: "georgia" , "times new roman" , serif; font-size: medium;"><span style="color: black;"><span style="font-weight: bold;">Date:</span> </span><!--mula script tarikh auto-->
<script language="JavaScript">
<!-- Begin
// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
// Join it all together
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
// Print out the data.
document.write("" +today+ "");
// End -->
</script><!--tamat script tarikh auto--></span></div>
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.