- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
function IntToDate2($x) {
$dd = $x*1;
$dd_Y = floor($dd/10000);
$dd_M = floor(($dd-($dd_Y*10000))/100);
$dd_D = $dd-($dd_Y*10000)-($dd_M*100);
if ($dd_M<10) $dd_M = "0".$dd_M;
if ($dd_D<10) $dd_D = "0".$dd_D;
$res = $dd_D.".".$dd_M.".".$dd_Y;
if ($dd == 0) $res = "";
return $res;
}
function IntToDate($x) {
$year = substr( $x, 0, 4 );
$month = substr( $x, 4, 2 );
$day = substr( $x, 6, 2 );
return $x == 0 ? '' : "$day.$month.$year";
}
function DateToInt2($x) {
$dd = explode(".",$x);
if (count($dd)>2) {
$dd = $dd[0]*1+$dd[1]*100+$dd[2]*10000;
} else {
$dd = 0;
}
return $dd;
}
function DateToInt($x)
{
$dd = explode('.',$x);
if (count($dd)>2)
$result = $dd[2].$dd[1].$dd[0];
else
$result = 0;
return $result ;
}
function StrDate($x) {
global $MM_Name2;
$dd = $x*1;
$dd_Y = floor($dd/10000);
$dd_M = floor(($dd-($dd_Y*10000))/100);
$dd_D = $dd-($dd_Y*10000)-($dd_M*100);
if ($dd_D<10) $dd_D = "0".$dd_D;
return $dd_D." ".$MM_Name2[$dd_M]." ".$dd_Y;
}
function StrMonth($x) {
global $MM_Name;
$dd = $x*1;
$dd_Y = floor($dd/10000);
$dd_M = floor(($dd-($dd_Y*10000))/100);
$dd_D = $dd-($dd_Y*10000)-($dd_M*100);
if ($dd_D<10) $dd_D = "0".$dd_D;
return $MM_Name[$dd_M]." ".$dd_Y;
}
$theday = mktime (0,0,0,date("m") ,date("d") ,date("Y"));
$today_0=date("d.m.Y",$theday);
$today_1=date("d.m.Y",$theday+(1*86400));
$today_7=date("d.m.Y",$theday+(7*86400));
Комментарии (0) RSS
Добавить комментарий