ProfessionalWiki / EDTF

PHP library to parse, represent and work with dates that follow the Extended Date/Time Format specification.
https://wikibase.consulting/wikibase-edtf
GNU General Public License v2.0
10 stars 7 forks source link

Fix handling of time values with 0 hours, minutes or seconds #23

Closed JeroenDeDauw closed 3 years ago

JeroenDeDauw commented 3 years ago

Problematic code in Parser.php:

if(0 === $value){
    $value = null;
}

Current broken behavior:

00:00:00 -> date object instead of date time object 01:00:00 -> blows up since it tries to construct date time object with null hours and minutes