Mercurial > libervia-backend
changeset 2247:0f3bfe89999e
jp (event): don't use dayfirst for YY-MM-DD style dates
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 May 2017 15:47:53 +0200 |
parents | e8641b7718dc |
children | a81261cee29b |
files | frontends/src/jp/cmd_event.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_event.py Fri May 19 13:53:52 2017 +0200 +++ b/frontends/src/jp/cmd_event.py Sun May 21 15:47:53 2017 +0200 @@ -81,7 +81,7 @@ date = int(self.args.date) except ValueError: try: - date_time = du_parser.parse(self.args.date, dayfirst=True) + date_time = du_parser.parse(self.args.date, dayfirst=not (u'-' in self.args.date)) except ValueError as e: self.parser.error(_(u"Can't parse date: {msg}").format(msg=e)) if date_time.tzinfo is None: