Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add DateTimeSelect element to form #2947

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

bakura10 commented Nov 12, 2012

Hi,

I'm not sure if this element is really needed, but I had some requests for it, so I suppose it is. There are plenty of room to optimize it as it heavily rely on IntlDate function, I suppose.

This PR just extends the DateSelect element by adding three more selects (or two) for selecting hour, minute and seconds, as it may be needed in CMS.

Contributor

chrvadala commented Nov 12, 2012

+1

Contributor

bakura10 commented Nov 12, 2012

Haha... Of course you were for it, you were the one asking it ^^.

Contributor

chrvadala commented Nov 12, 2012

oh yeee 🎯

@Maks3w Maks3w commented on the diff Nov 12, 2012

library/Zend/Code/Scanner/ClassScanner.php
@@ -110,8 +108,11 @@ public function __construct(array $classTokens, NameInformation $nameInformation
}
/**
+<<<<<<< HEAD
@Maks3w

Maks3w Nov 12, 2012

Member

Caution with this

@Maks3w Maks3w commented on the diff Nov 12, 2012

library/Zend/Code/Scanner/ClassScanner.php
@@ -124,22 +125,12 @@ public function getAnnotations(Annotation\AnnotationManager $annotationManager)
return new AnnotationScanner($annotationManager, $docComment, $this->nameInformation);
}
- /**
@Maks3w

Maks3w Nov 12, 2012

Member

Why remove this docblocks?

@bakura10

bakura10 Nov 12, 2012

Contributor

Don't know. Whenever I pull from develop I have a conflict in this file. I really don't know why.

Contributor

ThomasCantonnet commented Nov 14, 2012

et les millisecondes?? :(

je deconne

Contributor

bakura10 commented Nov 14, 2012

Haha non, j'étais déjà pas trop trop chaud pour cette modif'...

@chrvadala chrvadala commented on the diff Nov 19, 2012

library/Zend/Form/Element/DateTimeSelect.php
@@ -0,0 +1,314 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @package Zend_Form
+ */
+
+namespace Zend\Form\Element;
+
+use DateTime;
@chrvadala

chrvadala Nov 19, 2012

Contributor

I don't know why, but there is a conflict here.

Cannot use DateTime as DateTime because the name is already in use in Zend/Form/Element/DateTimeSelect.php on line 13

This use DateTime as DateTimePhp; worked for me.

@weierophinney

weierophinney Nov 19, 2012

Owner

It's because there's a DateTime class in the same namespace.

On Mon, Nov 19, 2012 at 8:28 AM, ArtigianoDelWeb
notifications@github.comwrote:

In library/Zend/Form/Element/DateTimeSelect.php:

@@ -0,0 +1,314 @@
+<?php
+/**

I don't now why, but there is a conflict here.

Cannot use DateTime as DateTime because the name is already in use in
Zend/Form/Element/DateTimeSelect.php on line 13

This use DateTime as DateTimePhp; worked for me.


Reply to this email directly or view it on GitHubhttps://github.com/zendframework/zf2/pull/2947/files#r2166752.

Matthew Weier O'Phinney
matthew@weierophinney.net
http://mwop.net/

@weierophinney weierophinney added a commit that referenced this pull request Nov 19, 2012

@weierophinney weierophinney [#2947] Alias DateTime to PhpDateTime
- because we have a DateTime class in the current namespace
025968b

@weierophinney weierophinney added a commit that referenced this pull request Nov 19, 2012

@weierophinney weierophinney [#2947] CS fixes
- eof character
313f94f
Owner

weierophinney commented Nov 19, 2012

Fixed the DateTime resolution, as well as a CS issue; merged.

@ghost ghost assigned weierophinney Nov 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment