Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Date::parseDate() to parse date only string. #163

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Conversation

ADmad
Copy link
Member

@ADmad ADmad commented Jun 22, 2017

DateFormatTrait::parseDate() by default uses format stored in $wordFormat for parsing date string.
Value of Time::$wordFormat differs from Date::$wordFormat hence using the former to parse date
strings results in incorrect date in the generated object.

DateFormatTrait::parseDate() by default uses format stored in $wordFormat for parsing date string.
Value of Time::$wordFormat differs from Date::$wordFormat hence using the former to parse date
strings results in incorrect date in the generated object.
@lorenzo lorenzo merged commit c892d05 into master Jun 22, 2017
@lorenzo lorenzo deleted the datetime-widget branch June 22, 2017 19:15
@lorenzo
Copy link
Member

lorenzo commented Jun 22, 2017

a more correct implementation could be TypeRegistry::build('date')->marshal($string), but this is good enough

@ADmad
Copy link
Member Author

ADmad commented Jun 22, 2017

That is indeed better. I'll make another PR updating all the date time string parsing calls.

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.

2 participants