Skip to content

Conversation

@gron1987
Copy link
Contributor

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 # )

@lstrojny
Copy link
Contributor

lstrojny commented Dec 2, 2012

Could you please add a test for it?

@lstrojny
Copy link
Contributor

lstrojny commented Jan 6, 2013

ping @gron1987

@gron1987
Copy link
Contributor Author

@lstrojny Sorry, crazy month. Will update tomorrow

@lstrojny
Copy link
Contributor

@gron1987 which "tomorrow" exactly? ;-)

@gron1987
Copy link
Contributor Author

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

@gron1987
Copy link
Contributor Author

@lstrojny
Added yesterday

@lstrojny
Copy link
Contributor

@derick could you review?

@gron1987
Copy link
Contributor Author

gron1987 commented Mar 5, 2013

ping @lstrojny @derick

@lstrojny
Copy link
Contributor

lstrojny commented Mar 7, 2013

Sorry @gron1987, @derick ping again

@lstrojny
Copy link
Contributor

@derick ping again

@gron1987
Copy link
Contributor Author

gron1987 commented Apr 5, 2013

@lstrojny @derickr ping ? :)

@derickr
Copy link
Member

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

@smalyshev
Copy link
Contributor

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.

@php-pulls
Copy link

Comment on behalf of stas at php.net:

I've fixed the patch and merged it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants