[TYPO3-dev] new DateTime not working

Jonathan Starck info at cretection.eu
Wed Mar 13 15:36:45 CET 2013


Cool, it works fantastic.

Thanks!
 
Am 13.03.2013 um 15:32 schrieb "Iffland, Sebastian" <Sebastian.Iffland at ecom-ex.com>:

> Hi,
> 
> Did you try prepending Slash for DateTime object, should look like
> class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
> 	public function findAll() {
> 		$query = $this->createQuery();
> 		$query->setOrderings(array('eventdate' =>
> \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING));
> 		$query->matching(
> 			$query->greaterThanOrEqual('eventstopdate', new \DateTime('midnight'))
> 		);
> 		return $query->execute();
> 	}
> }
> 
> Regards,
> Sebastian
> 
> 
> 
> 
> 
> Am 3/13/13 3:14 PM schrieb "Jonathan Starck" unter <info at cretection.eu>:
> 
>> Hi,
>> 
>> I try to use:
>> 
>> class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
>> 	public function findAll() {
>> 		$query = $this->createQuery();
>> 		$query->setOrderings(array('eventdate' =>
>> \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING));
>> 		$query->matching(
>> 			$query->greaterThanOrEqual('eventstopdate', new DateTime('midnight'))
>> 		);
>> 		return $query->execute();
>> 	}
>> }
>> 
>> but it does not work for me. I know it is working in old Extbase
>> Extensions.
>> Can someone give me a tip how it works now? I am using TYPO3 6.0.
>> 
>> regards
>> Jonathan
>> _______________________________________________
>> TYPO3-dev mailing list
>> TYPO3-dev at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
> 
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list