How do I get a 4-digit year number with:
echo $this->dateFormat(
new DateTime(),
IntlDateFormatter::SHORT, // date
IntlDateFormatter::NONE, // time
"nl_NL");
Now I get: 01-01-14
(1st of January 2014)
But I want: 01-01-2014
How do I get a 4-digit year number with:
echo $this->dateFormat(
new DateTime(),
IntlDateFormatter::SHORT, // date
IntlDateFormatter::NONE, // time
"nl_NL");
Now I get: 01-01-14
(1st of January 2014)
But I want: 01-01-2014
I don't know for sure, but you can maybe use something like:
$dateString = Zend_Locale_Format::getDate(
date('d-m-Y'),
array(
'date_format' => 'dd.MM.yyyy',
)
);
Or just use date()
.