Skip to content

Commit 53e5f02

Browse files
authored
fix(parser): handle spacing in month parsing
1 parent a1be221 commit 53e5f02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/time_shield_cpp/time_shield/time_parser.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ namespace time_shield {
6363
if (month.empty()) throw std::invalid_argument("Invalid month name");
6464

6565
std::string month_copy = month;
66-
std::transform(month_copy .begin(), month_copy .end(), month_copy .begin(), [](char &ch) {
66+
std::transform(month_copy.begin(), month_copy.end(), month_copy.begin(), [](char &ch) {
6767
return std::use_facet<std::ctype<char>>(std::locale()).tolower(ch);
6868
});
69-
month_copy [0] = toupper(month_copy [0]);
69+
month_copy[0] = toupper(month_copy[0]);
7070

7171
static const std::array<std::string, 12> short_names = {
7272
"Jan", "Feb", "Mar", "Apr", "May", "Jun",

0 commit comments

Comments
 (0)