From 13bab9fc8e3d9fe2f37f332b2b6c22d5989ebd0b Mon Sep 17 00:00:00 2001 From: stwind Date: Fri, 17 Jan 2014 11:08:20 +0800 Subject: [PATCH] Support character escaping --- src/qdate.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qdate.erl b/src/qdate.erl index 4a38aa1..60b26ab 100644 --- a/src/qdate.erl +++ b/src/qdate.erl @@ -125,6 +125,8 @@ to_string(Format, ToTZ, Disambiguate, Date) when is_list(Format) -> to_string_worker([], _, _, _) -> ""; +to_string_worker([$\\,H|RestFormat], ToTZ, Disamb, Date) -> + [H|to_string_worker(RestFormat, ToTZ, Disamb, Date)]; to_string_worker([$e|RestFormat], ToTZ, Disamb, Date) -> ToTZ ++ to_string_worker(RestFormat, ToTZ, Disamb, Date); to_string_worker([$I|RestFormat], ToTZ, Disamb, Date) ->