_javascript

Day Identifier

<html>
<head>
    <title>Wikidot Calendar</title>
 
    <style type="text/css">
        @import url("http://www.wikidot.com/common--theme/base/css/style.css");
        @import url("/local--code/calendar:_css");
    </style>
</head>
<body>
    <script type="text/javascript">
        var d=new Date();
        d.setHours(0);
        d.setMinutes(0);
        d.setSeconds(0);
        d.setMilliseconds(0);
 
        var date_params = /^#_([0-9][0-9][0-9][0-9])\-([0-9][0-9]?)\-([0-9][0-9]?).*?$/;
        var url_date = date_params.exec(unescape(window.location.hash));
 
        if (url_date) {
            d.setFullYear(url_date[1]);
            d.setMonth(url_date[2]-1);
            d.setDate(url_date[3]);
 
            var weekday=new Array(7);
            weekday[0]="Domenica";
            weekday[1]="Lunedì";
            weekday[2]="Martedì";
            weekday[3]="Mercoledì";
            weekday[4]="Giovedì";
            weekday[5]="Venerdì";
            weekday[6]="Sabato";
 
            var month=new Array(12);
            month[0]="Gennaio";
            month[1]="Febbraio";
            month[2]="Marzo";
            month[3]="Aprile";
            month[4]="Maggio";
            month[5]="Giugno";
            month[6]="Luglio";
            month[7]="Agosto";
            month[8]="Settembre";
            month[9]="Ottobre";
            month[10]="Novembre";
            month[11]="Dicembre";
 
            document.write('<table class="iframe" style="margin: 0 auto;"><tr><td class="weekday">' + weekday[d.getDay()] + '</td><td><table class="month-day"><tr><td class="month">' + month[d.getMonth()] + '</td></tr><tr><td class="day">' + d.getDate() + '</td></tr></table></td><td class="year">' + d.getFullYear() + '</td></tr></table>');
        }
        else
            document.write('<i><b>' + unescape(window.location.hash) + '</b> is an invalid date</i>');
    </script>
</body>
</html>

Back Link

<html>
<head>
    <style type="text/css">
        @import url("http://www.wikidot.com/common--theme/base/css/style.css");
        @import url("/local--code/calendar:_css");
    </style>
</head>
<body>
    <span class="gobacklink" style="font-weight:bold;"><a href="javascript:history.go(-1)">Back</a></span>
</body>
</html>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License