new document title> < Meta name = "Author" content = "> Function showweek () // display Chinese Week {now = new date () // Define new objects, NEW has DATE nature IF (now.getday () == 0) Return ("Monday") IF (now.getday () == 1) Return ("Tuesday") IF (now.getday () == 2) Return ("Wednesday") IF (now.getday () == 3) Return ("Thursday") IF (now.getday () == 4) Return ("Friday") IF (now.getday () == 5) Return ("Saturday") IF (now.getday () == 6) Return ("Sunday)}
Function showdate () // Display system date {var now = new date () var year = now.getyear () var month = now.getMonth () 1 var day = now.getdate () Return Year "Year" Month "Month" Day "Day"} script> head>