Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Prepending time formats when using RegisterTimeFormats #1170

Merged
merged 2 commits into from
Jul 15, 2018

Conversation

paganotoni
Copy link
Member

@paganotoni paganotoni commented Jul 14, 2018

This PR changes the way we add time formats when using RegisterTimeFormats, instead of appending the PR's the developer is passing we should prepend these to the list of formats, that is to give more importance to the time formats passed by developers than defaults.

As an example if we call RegisterTimeFormats("2006-02-01") and try to parse a date like 2017-01-10 buffalo our be using 2006-01-02 which is one of the defaults, instead of using the time format we just registered.

This PR prepends developer-added formats so these get evaluated first.

@paganotoni paganotoni requested a review from markbates July 14, 2018 19:34
@codecov
Copy link

codecov bot commented Jul 14, 2018

Codecov Report

Merging #1170 into development will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #1170      +/-   ##
===============================================
+ Coverage         50.6%   50.65%   +0.05%     
===============================================
  Files               74       74              
  Lines             3794     3794              
===============================================
+ Hits              1920     1922       +2     
+ Misses            1757     1755       -2     
  Partials           117      117
Impacted Files Coverage Δ
binding/binding.go 45.78% <100%> (+2.4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36986b2...5d54f78. Read the comment docs.

@markbates markbates added this to the v0.12.4 milestone Jul 15, 2018
@markbates markbates merged commit 55756f0 into development Jul 15, 2018
@paganotoni paganotoni deleted the prepend-time-formats branch July 16, 2018 13:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants