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

Update Date.php #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update Date.php #39

wants to merge 1 commit into from

Conversation

Scorpshn
Copy link
Contributor

isset and !isset is not working because the $tmp date values are set to false. Replace with !empty and empty
Ex
if (!empty($tmp_start_date)) = false
because
($tmp_start_date = $this->_is_format_valid($this->attributes['direction'][0]))
function _is_format_valid return false and set $tmp_start_date
!empty and empty test for isset and if the value is false or ''

Add test for if date $obj->direction(array(1, 7)); to add the first array value to the second otherwise it will give error on the 7th day
Ex. if today is 2017-07-17
2017-07-18
2017-07-25 gives error because test till 2017-07-24

add the if in line 1147
if $obj->direction(array(5,7)); check for 7 days not working because $this->attributes['direction'][0] not added to $this->attributes['direction'][1] from today

add the if in line 1150
if $obj->direction(array('2017-07-18', 7')); to check 7 days didn't work because system_date used and not $this->attributes['direction'][0])

added the same to get the start date if you have the end date line 1189

isset and !isset is not working because the $tmp date values are set to false. Replace with !empty and empty
Ex
if (!empty($tmp_start_date)) = false
because
($tmp_start_date = $this->_is_format_valid($this->attributes['direction'][0]))
function _is_format_valid return false and set $tmp_start_date
!empty and empty test for isset and if the value is false or ''

Add test for if date  $obj->direction(array(1, 7)); to add the first array value to the second otherwise it will give error on the 7th day
Ex. if today is 2017-07-17
2017-07-18
2017-07-25 gives error because test till 2017-07-24

add the if in line 1147
if $obj->direction(array(5,7)); check for 7 days not working because $this->attributes['direction'][0] not added to $this->attributes['direction'][1] from today

add the if in line 1150
if $obj->direction(array('2017-07-18', 7')); to check 7 days didn't work because system_date used and not $this->attributes['direction'][0])

added the same to get the start date if you have the end date line 1189
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.

None yet

1 participant