PHP date_isodate_set() İşlevi
Örnek
ISO tarihini 2013'te 5. haftaya ayarlayın:
<?php
$date=date_create();
date_isodate_set($date,2013,5);
echo date_format($date,"Y-m-d");
?>
Tanım ve Kullanım
date_isodate_set() işlevi, (belirli bir tarih kullanmak yerine) haftalar ve gün ofsetlerini kullanarak ISO 8601 standardına göre bir tarih ayarlar.
Sözdizimi
date_isodate_set(object, year, week, day)
Parametre Değerleri
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
year | Required. Specifies the year of the date |
week | Required. Specifies the week of the date |
day | Optional. Specifies the offset from the first day of the week. Default is 1 |
Teknik detaylar
Geri dönüş değeri: | Başarı durumunda bir DateTime nesnesi döndürür. Başarısızlıkta YANLIŞ |
---|---|
PHP Sürümü: | 5.2+ |
PHP Değişiklik Günlüğü: | PHP 5.3: Dönüş değeri NULL'dan DateTime'a değiştirildi |
❮ PHP Tarih/Saat Referansı