Skip to content

Update Date.php#39

Open
Scorpshn wants to merge 1 commit intostefangabos:masterfrom
Scorpshn:patch-2
Open

Update Date.php#39
Scorpshn wants to merge 1 commit intostefangabos:masterfrom
Scorpshn:patch-2

Conversation

@Scorpshn
Copy link
Copy Markdown
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.

1 participant