format: improve format handling
datetime: adapt to new formatting