added support for Date objects to zero-length-brush related code