﻿    var now = new Date();

    // Array list of days.
    var days = new Array('&#1575;&#1604;&#1571;&#1581;&#1583;','&#1575;&#1604;&#1573;&#1579;&#1606;&#1610;&#1606;','&#1575;&#1604;&#1579;&#1604;&#1575;&#1579;&#1575;&#1569;','&#1575;&#1604;&#1571;&#1585;&#1576;&#1593;&#1575;&#1569;','&#1575;&#1604;&#1582;&#1605;&#1610;&#1587;','&#1575;&#1604;&#1580;&#1605;&#1593;&#1577;','&#1575;&#1604;&#1587;&#1576;&#1578;');

    // Calculate the number of the current day in the week.
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

    // Array list of months.
    var months = new Array('&#1610;&#1606;&#1575;&#1610;&#1585;','&#1601;&#1576;&#1585;&#1575;&#1610;&#1585;','&#1605;&#1575;&#1585;&#1587;','&#1573;&#1576;&#1585;&#1610;&#1604;','&#1605;&#1575;&#1610;&#1608;','&#1610;&#1608;&#1606;&#1610;&#1608;','&#1610;&#1608;&#1604;&#1610;&#1608;','&#1571;&#1594;&#1587;&#1591;&#1587;','&#1587;&#1576;&#1578;&#1605;&#1576;&#1585;','&#1571;&#1603;&#1578;&#1608;&#1576;&#1585;','&#1606;&#1608;&#1601;&#1605;&#1576;&#1585;','&#1583;&#1610;&#1587;&#1605;&#1576;&#1585;');

    // 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);