0

I'm trying to use the Zend_Date class for my project. I'm working with the PHP Storm IDE and I've searched throughout the ZF2 folder which is included in my project under the:

/vendor/ZF2/library/Zend/ -> now it should be somewhere here but I couldnt've find it in the folder structure...

I've also tried doing the following in code:

$date = new Zend_Date();

but it prints out the following error:

Undefined class Zend_Date

Where am I supposed to find the Zend_Date class, and if it's not included in my folder structure, where can I get it ?

Wilt
  • 41,477
  • 12
  • 152
  • 203
perkes456
  • 1,163
  • 4
  • 25
  • 49
  • I think you need to download Zend framework into you project. It's a class in zend framework. http://framework.zend.com/manual/1.12/en/zend.date.introduction.html I'm not sure. – mbo May 20 '16 at 08:07
  • 3
    Possible duplicate of [Where do I find Date class in Zend Framework 2.0?](http://stackoverflow.com/questions/12401221/where-do-i-find-date-class-in-zend-framework-2-0) – Mihai Matei May 20 '16 at 08:10

1 Answers1

0

Zend_Date is a class from Zend Framework 1. You seem to be using Zend Framework 2. Don't mix ZF1 and ZF2 functionality.

There is a DateTime class in ZF2 (Zend\Stdlib\DateTime) but it has been deprecated as of ZF 2.1.4. Use the PHP DateTime class instead. Docs can be found here on php.net.

Wilt
  • 41,477
  • 12
  • 152
  • 203