Re: django.utils.dateparse

2019-02-04 Thread Giuseppe De Marco
dered by those example :) So are 2019-02-04 and 04/02/19. (Or is it 02/04/19?) > It Will depend by settings.py, that's the goal > > Anyway, if you think this is generally useful, you can easily package it > into a third-party module. > Consider It done, I thougth on a wider featu

Re: django.utils.dateparse

2019-02-04 Thread Giuseppe De Marco
etime_heuristic_parser" "print(datetime_heuristic_parser('04/12/2018 09:7:4'))" 1 loops, best of 3: 25.4 usec per loop Il giorno lun 4 feb 2019 alle ore 15:18 Andreas Pelme ha scritto: > On 4 Feb 2019, at 15:04, Giuseppe De Marco > wrote: > >

Re: Google Summer of Code 2019

2019-02-04 Thread Giuseppe De Marco
Hi Tim, It returns 404 to me https://github.com/django/django-team-wiki/wiki/Google-Summer-of-Code-Application-Info Il giorno lun 4 feb 2019 alle ore 13:05 Tim Graham ha scritto: > All answers are at > https://github.com/django/django-team-wiki/wiki/Google-Summer-of-Code-Application-Info > --

Re: django.utils.dateparse

2019-02-04 Thread Giuseppe De Marco
gt; > In [3]: %timeit parse_datetime('2019-02-03T17:27:58.645194') > 6.97 µs ± 408 ns per loop (mean ± std. dev. of 7 runs, 10 loops each) > > I assume there is something wrong with the way you benchmarked the code. > Python is not *that* slow, but 0.0241 per loop is way,

Re: django.utils.dateparse

2019-02-04 Thread Giuseppe De Marco
; To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on t

Re: django.utils.dateparse

2019-02-03 Thread Giuseppe De Marco
Regarding the previous example, better to read it here (my fault: I mistaken the format '%Y-%m-%dT%H:%M:%S.%f'): https://github.com/peppelinux/Django-snippets/blob/master/datetime_heuristic_parser.py and also, it should came also with tzinfo regexp and other functions as well, like parse_date time

Re: django.utils.dateparse

2019-02-03 Thread Giuseppe De Marco
imes slower than the current implementation of parse_datetime: > > $ python -m timeit -s "from django.conf import settings; > settings.configured or settings.configure(); from django.utils.dateparse > import parse_datetime_alternative as parse_datetime" > "parse_date

django.utils.dateparse

2019-02-03 Thread Giuseppe De Marco
Hi All, it's the first time for me in this ml, I'd like to purpose a refactor of django.utils.dateparse functions. Currently a function in it, like parse_date for example, extract date time string with a static regexp... https://docs.djangoproject.com/pl/2.1/_modules/django/utils/dateparse/ The