(user_format: &str)
| 109 | } |
| 110 | |
| 111 | fn convert_format(user_format: &str) -> String { |
| 112 | user_format |
| 113 | .replace("YYYY", "%Y") |
| 114 | .replace("YY", "%y") |
| 115 | .replace("MM", "%m") |
| 116 | .replace("DD", "%d") |
| 117 | .replace("M", "%m") |
| 118 | .replace("D", "%d") |
| 119 | } |
| 120 | |
| 121 | #[cfg(test)] |
| 122 | mod tests { |
no outgoing calls
no test coverage detected