Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Дата на PHP
<script type="text/javascript" src="{THEME}/js/active.js"></script>
<script language="JavaScript">
<!--
dayarray=new Array("Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота")
montharray=new Array ("Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря")
ndata=new Date();
day=dayarray[ndata.getDay()];
month=montharray[ndata.getMonth()];
date=ndata.getDate();
year=ndata.getFullYear();
hours = ndata.getHours();
mins = ndata.getMinutes();
secs = ndata.getSeconds();
if (hours < 10) {hours = "0" + hours }
if (mins < 10) {mins = "0" + mins }
if (secs < 10) {secs = "0" + secs }
// datastr=("Сегодня "+ date +" "+ month +" "+ year +" года, "+day+", "+ hours + ":" + mins )
datastr=(day+ ", " +date+ " " +month+ " " +year)
-->
</script>
//Другой пример: дата автоматически меняется по истечению года//
<div class="col-sm-12 copyright">
<span>Copyright © 2012-<?php echo date('Y'); ?> Comité Internationaal</span><br>
<small class="webdesign">Webdesign by Murat ORS</small>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment