code: public static function seconds($seconds, $is_ms = false, $format = "%dD %02d:%02d:%02d")
      {
          if ($is_ms) {
              $seconds = $seconds / 1000;
          }
  
          return sprintf(
              $format,
              $seconds / 60 / 60 / 24,
              ($seconds / 60 / 60) % 24,
              ($seconds / 60) % 60,
              $seconds % 60
          );
      }
docs: Converts seconds/milliseconds to a human readable value.
  
  @param  integer $seconds
  @param  boolean $is_ms
  @param  string $format
  @return string