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

Fix DateTime, when use it with D/l in format and textual day have dot at... #237

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

gron1987 commented Nov 28, 2012

Fix DateTime, when use it with D/l in format and textual day have dot at the end

For example :

$string = "Sun., Nov. 29, 2012 5:00PM";

$data = DateTime::createFromFormat( "D., M# j, Y g:iA", $string );

var_dump( $data );
var_dump( DateTime::getLastErrors() );

return

bool(false)
array(4) {
  'warning_count' =>
  int(0)
  'warnings' =>
  array(0) {
  }
  'error_count' =>
  int(2)
  'errors' =>
  array(2) {
    [0] =>
    string(32) "A textual day could not be found"
    [4] =>
    string(40) "The separation symbol could not be found"
  }
}

This fix add more stop characters ( from # )

Contributor

lstrojny commented Dec 2, 2012

Could you please add a test for it?

Contributor

lstrojny commented Jan 6, 2013

ping @gron1987

Contributor

gron1987 commented Jan 12, 2013

@lstrojny Sorry, crazy month. Will update tomorrow

Contributor

lstrojny commented Jan 14, 2013

@gron1987 which "tomorrow" exactly? ;-)

Contributor

gron1987 commented Jan 14, 2013

@lstrojny Creating it now ) Just try to understand how it works :)

Contributor

gron1987 commented Jan 15, 2013

@lstrojny
Added yesterday

Contributor

lstrojny commented Jan 15, 2013

@derick could you review?

Contributor

gron1987 commented Mar 5, 2013

Contributor

lstrojny commented Mar 7, 2013

Sorry @gron1987, @derick ping again

Contributor

lstrojny commented Mar 11, 2013

@derick ping again

Contributor

gron1987 commented Apr 5, 2013

@lstrojny @derickr ping ? :)

Contributor

derickr commented Apr 5, 2013

I'm on holiday. If you could mail me a list of the issues in datetime then I'll look at asap

http://derickrethans.nl - http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

Contributor

smalyshev commented Aug 25, 2013

This patch doesn't see to be correct. First, the file that needs to be patched is parse_date.re since parse_date.c is generated from it. Second, the test still fails for me.

Comment on behalf of stas at php.net:

I've fixed the patch and merged it

@php-pulls php-pulls closed this Aug 25, 2013

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