Jump to content

Recommended Posts

Posted

I would like to display the actual date in a page. Is there a code which I can use in the editor, not in template?

Posted

This works for me, placed it in hannah code [[date]]

var days = ["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"];
var months = ["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"];
var d = new Date();
datum = days[d.getDay()] +', '+ d.getDate() +' '+ months[d.getMonth()] +' '+ d.getFullYear();
document.write('\x3Cp>\x3Cstrong>' + datum + '\x3C/strong>\x3C/p>');

just change days and months names to your language, works like a charm!

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...