Inserting a date

Date Insertion


Hi, I want to insert the date into my website. For example, if you go to this website, it gives you the date on which you are viewing the website at the top right corner. How do I do this for my website?

Many thanks,

Francis

Check this out http://livehelper.webflow.com/#currentdate

It uses script that put into embed
Notes “be sure to check on different browsers for potential broken result”

<script language="JavaScript">
function PageDate()
{
currentDate = new Date()
with (currentDate)
{
day=getDay()
month=getMonth()
if (day==1){document.write(' Monday')}
if (day==2){document.write(' Tuesday')}
if (day==3){document.write(' Wednesday')}
if (day==4){document.write(' Thursday')}
if (day==5){document.write(' Friday')}
if (day==6){document.write(' Saturday')}
if (day==0){document.write(' Sunday')}
document.write(', ')
if (month==0){document.write('Jan. ')}
if (month==1){document.write('Feb. ')}
if (month==2){document.write('March ')}
if (month==3){document.write('Apr. ')}
if (month==4){document.write('May. ')}
if (month==5){document.write('Jun. ')}
if (month==6){document.write('Jul. ')}
if (month==7){document.write('Aug. ')}
if (month==8){document.write('Sept. ')}
if (month==9){document.write('Oct. ')}
if (month==10){document.write('Nov. ')}
if (month==11){document.write('Dec. ')}
this.document.write(getDate()+', '+getFullYear())
}
}
PageDate()
</script>

Cheers

Hey @pastiwibawa, I really like your livehelper webflow concept.

Cheers

1 Like

@gosselin07 thanks :smiley: