Created
March 11, 2016 01:45
-
-
Save MuratOrs/5a63b0fcd40ce6c656ca to your computer and use it in GitHub Desktop.
Дата на PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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