I already commented on this last time: "Such code could go to a separate class. The "String" here is the ISO 8601 date format, by the way, so this term could be used in the method name."