Closed stwind closed 10 years ago
Currently there is no way to print a literal format character, because qdate:to_string_worker/4 aggressively parses them before ec_date:format/3 can escape them.
1> qdate:to_string("Y"). "2014" 2> qdate:to_string("\\Y"). "\\2014"
This patch will do a same thing as ec_date, escaping format character with \\.
ec_date
\\
1> qdate:to_string("Y"). "2014" 2> qdate:to_string("\\Y"). "Y" 3> qdate:to_string("Z"). "+0" 4> qdate:to_string("\\Z"). "Z"
Thanks so much for the code contribution!
Currently there is no way to print a literal format character, because qdate:to_string_worker/4 aggressively parses them before ec_date:format/3 can escape them.
This patch will do a same thing as
ec_date
, escaping format character with\\
.