Skip to content

assertion error in DateConverter in DbaseΒ #128

@JohnnyQ352

Description

@JohnnyQ352

The "toBinaryString" function returns an assertion error when evaluating the date length of $value because it is not stripping the characters of a date away before evaluation. I temporarily created a solution by adding the following to the code before the assertion:

if(strlen($value) != 8){
$value = preg_replace('/[^0-9]/', '', $value);
}

This allows the code to strip away any non-numeric from the date, like the "/" or "-" between characters that make up a date.
I am assuming this is because it is being looked at as a character first and not exactly a date per say. I will be checking back to see if there is any updates in your code to correct this or if this was any help.

Thanks you,

JohnnyQ352

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions