17d1f7fed5e55519bc3a25a70b3dc655a72170f3,jarbas/core/management/commands/loadsuppliers.py,Command,to_date,#Any#,92

Before Change



            year_code = "%Y" if len(year) == 4 else "%y"
            formatted = "{}/{}/{}".format(day.zfill(2), month.zfill(2), year)
            dt = datetime.strptime(formatted, "%d/%m/" + year_code)
            return datetime.strftime(dt, "%Y-%m-%d")

        except ValueError:
            return None

After Change


                year += 2000
            elif 50 < year <= 99:
                year += 1900
            return date(year, month, day)

        except ValueError:
            return None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: okfn-brasil/serenata-de-amor
Commit Name: 17d1f7fed5e55519bc3a25a70b3dc655a72170f3
Time: 2016-11-09
Author: cuducos@gmail.com
File Name: jarbas/core/management/commands/loadsuppliers.py
Class Name: Command
Method Name: to_date


Project Name: hyperspy/hyperspy
Commit Name: 92b38662c61c28841d4f6bf1485b21023f566a3e
Time: 2016-08-09
Author: eric.prestat@gmail.com
File Name: hyperspy/io_plugins/blockfile.py
Class Name:
Method Name: _from_serial_date


Project Name: hyperspy/hyperspy
Commit Name: d9126dac9355abaf922b962bfdd5368a177545fd
Time: 2016-09-05
Author: eric.prestat@gmail.com
File Name: hyperspy/io_plugins/blockfile.py
Class Name:
Method Name: _from_serial_date