Skip to content

Instantly share code, notes, and snippets.

@smtechno
Last active October 18, 2017 13:42
Show Gist options
  • Save smtechno/178d749edb7d864e5e0f2c84f7efc04d to your computer and use it in GitHub Desktop.
Save smtechno/178d749edb7d864e5e0f2c84f7efc04d to your computer and use it in GitHub Desktop.
Automation Date For Minisite
<span style="font-family: Georgia, Times New Roman, serif; font-size: large;"><span style="color: black;"><span style="font-weight: bold;"><br /></span></span></span><span style="font-family: Georgia, 'Times New Roman', serif; font-size: large; font-weight: bold;">From SOHO :</span><span style="font-family: Georgia, 'Times New Roman', serif; font-size: large;">Faiz Alias</span><br />
<span style="font-family: Georgia, Times New Roman, serif; font-size: large;"><span style="color: black;"><span style="font-weight: bold;">Date:</span>&nbsp;</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><br />
<span style="color: black; font-family: Georgia, Times New Roman, serif; font-size: large;"><span style="font-weight: bold;">RE:</span> <span style="font-weight: bold; text-decoration: underline;">Put Your Title Here</span></span><br />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment