IntlDateFormatter::getDateType
datefmt_get_datetype
(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
IntlDateFormatter::getDateType -- datefmt_get_datetype — IntlDateFormatter tarafından kullanılan tarih gösterim türünü döndürür
Açıklama
Nesne yönelimli kullanım
int IntlDateFormatter::getDateType
( void
)
Yordamsal kullanım
Biçemleyici tarafından kullanılan tarih gösterim türünü döndürür.
Değiştirgeler
-
biçemleyici -
Biçemleyici nesne.
Dönen Değerler
Geçerli tarih gösterim türü.
Örnekler
Örnek 1 - datefmt_get_datetype() örneği
<?php
$fmt = datefmt_create("tr_TR", IntlDateFormatter::FULL,
IntlDateFormatter::FULL,'Europe/Istanbul',
IntlDateFormatter::GREGORIAN);
echo "Biçemleyicinin tarih gösterim türü: ".datefmt_get_datetype($fmt);
echo "\nBiçemli çıktı: ".datefmt_format($fmt, 1234567890);
$fmt = datefmt_create("tr_TR", IntlDateFormatter::SHORT,
IntlDateFormatter::FULL, 'Europe/Istanbul',
IntlDateFormatter::GREGORIAN);
echo "\nBiçemleyicinin yeni tarih gösterim türü: ".datefmt_get_datetype($fmt);
echo "\nİkinci biçemli çıktı: ".datefmt_format($fmt, 1234567890);
?>
Örnek 2 - Nesne yönelimli kullanım örneği
<?php
$fmt = new IntlDateFormatter("tr_TR", IntlDateFormatter::FULL,
IntlDateFormatter::FULL,'Europe/Istanbul',
IntlDateFormatter::GREGORIAN);
echo "Biçemleyicinin tarih gösterim türü: ".$fmt->getDateType();
echo "\nBiçemli çıktı: ".datefmt_format( $fmt, 1234567890);
$fmt = new IntlDateFormatter("tr_TR", IntlDateFormatter::SHORT,
IntlDateFormatter::FULL,'Europe/Istanbul',
IntlDateFormatter::GREGORIAN);
echo "\nBiçemleyicinin yeni tarih gösterim türü: ".$fmt->getDateType();
echo "\nİkinci biçemli çıktı: ".datefmt_format( $fmt, 1234567890);
?>
Yukarıdaki örneğin çıktısı:
Biçemleyicinin tarih gösterim türü: 0 Biçemli çıktı: 14 Şubat 2009 Cumartesi 01:31:30 Türkiye Saati Biçemleyicinin yeni tarih gösterim türü: 3 İkinci biçemli çıktı: 14.02.2009 01:31:30
Ayrıca Bakınız
- datefmt_get_timetype() - IntlDateFormatter tarafından kullanılan zaman gösterim türünü döndürür
- datefmt_create() - Bir tarih biçemleyici oluşturur
There are no user contributed notes for this page.
