Skip to content

Commit

Permalink
Correção dateInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoliveiraGN committed Jun 8, 2021
1 parent 713c238 commit ba61391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/gerencianet.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function gerencianetUpdateBillet($vars)

$date = DateTime::createFromFormat('Y-m-d', $dueDate);
if ((int)$numDiasParaVencimento > 0)
$date->add(new DateInterval('P' . (string)$numDiasParaVencimento . 'D'));
$date- >add(new DateInterval('PT' . (string)$numDiasParaVencimento . 'D'));
$newDueDate = (string)$date->format('Y-m-d');

if ($newDueDate >= date('Y-m-d')) {
Expand Down

0 comments on commit ba61391

Please sign in to comment.