improved date string support, added tests