Alters the timestamp

date_modify

(PHP 5 >= 5.1.0)

date_modifyAlters the timestamp

Opis

void date_modify ( DateTime $object , string $modify )
void DateTime::modify ( string $modify )

Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().

Parametry

object

Procedural style only: A DateTime object returned by date_create()

modify

String in a relative format accepted by strtotime().

Zwracane wartości

Returns NULL on success or FALSE on failure.

Przykłady

Example #1 A date_modify() example

<?php
$date 
= new DateTime("2006-12-12");
$date->modify("+1 day");
echo 
$date->format("Y-m-d");
?>

Powyższy przykład wyświetli:

2006-12-13

Zobacz też:


projektowanie stron | pióra | pióra | biżuteria z brylantem | zegarki | projektowanie stron warszawa | diamenty | szkolenia rekrutacja | tarasy drewniane | kółka meblowe | vivo domus | masaż bańką chińską | Kabiny prysznicowe
Design by flankerds.com