PDA

View Full Version : estefade az tarikh va moghayeseye oon ba tarikh system



miladclik
شنبه 15 مهر 1385, 21:49 عصر
man mikham ye tarikh ro start va end ro varede db khod bokonam va badesh bekham in tarikha ro ba tarikhe system moghayese konam .
che kari bayad bokonam ta betona javab begiram?
mamnoon.

Lagon666
شنبه 15 مهر 1385, 22:02 عصر
http://ir.php.net/manual/en/function.date.php


<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('UTC');


// Prints something like: Monday
echo date("l");

// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));

/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);

// prints something like: 2000-07-01T00:00:00+00:00
echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));

?>



<?php
// prints something like: Wednesday the 15th
echo date("l \\t\h\e jS");
?>


<?php
// Assuming today is: March 10th, 2001, 5:16:18 pm

$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day z '); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day.
$today = date("D M j G:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month
$today = date("H:i:s"); // 17:16:17
?>

houtanal
شنبه 15 مهر 1385, 22:32 عصر
اینجا الزاما ً باید فارسی سئوال کنی.امیدوارم تو پست های بعدیت رعایت کنی.