With as.character(), long numbers with many zeros at the end get converted to scientific notation which the parse of course fails to recognise. Using format(..., scientific = FALSE) prevents that. trim = TRUE is necessary for variable length input. Add tests for these problematic numbers. Tests also check wether the behaviour of as.character() changes but format() outperforms as.character() and may be preferred anyway.
… incomplete dates