0

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

edigu
  • 9,878
  • 5
  • 57
  • 80

1 Answers1

0

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().

Refilon
  • 3,334
  • 1
  • 27
  • 51