MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / convert_format

Function convert_format

aiscript-directive/src/validator/date.rs:111–119  ·  view source on GitHub ↗
(user_format: &str)

Source from the content-addressed store, hash-verified

109}
110
111fn 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)]
122mod tests {

Callers 2

validateMethod · 0.85
from_directiveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected