- 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
function chckdate( $date )
{
if ( !strrchr( $date, '.' ) )
$date = splt( $date, "." );
$tmp = explode( ".", $date );
if ( (count( $tmp ) != 3) || (!checkdate( $tmp[1], $tmp[0], $tmp[2] )) )
{
return 0;
}
return $date;
}
function plus( $date, $days )
{
$tmp = explode( "-", $date );
$date = mktime( 0, 0, 0, $tmp[1], $tmp[2], $tmp[0] );
$date = strtotime( "+" . $days . " day", $date );
return date( "Y-m-d", $date );
}
function conv( $date, $sep )
{
$tmp = explode( $sep, $date );
return $tmp[2] . "-" . $tmp[1] . "-" . $tmp[0];
}
function splt( $date, $sep )
{
$tmp = array( substr( $date, 0, 2 ), substr( $date, 2, 2 ), substr( $date, 4, 4 ) );
$date = implode( $sep, $tmp );
return $date;
}
bormand 23.07.2012 13:19 # +1
Fai 23.07.2012 13:23 # +3
bormand 23.07.2012 13:29 # +1
psycho-coder 23.07.2012 13:30 # +1
guest 24.07.2012 09:35 # 0