Contact
Sitemap
Download
Buy online
Imprint
Home

How to display the current date and day-name

Copy and paste the following code in a CityDesk variable, say "currentDate" (you could also paste this code directly in your template), and add the variable command {$.currentDate$} any place you desire within your template:

<script type="text/javascript">
<!--

var monthNames = new Array( 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , 'October' , 'November' , 'December' );

var dayNames = new Array( 'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' );

var now = new Date();

document.write(dayNames[now.getDay()] + ', ' + monthNames[now.getMonth()] + ' ' + now.getDate() + ', ' + now.getYear());

//-->
</script>

JavaScript Extensions

Copyright © 2005-2006 by telepark. All rights reserved.