Skip to content

[Date] set higher priority at new defined parsers #1100

Open
wants to merge 1 commit into from

1 participant

@danielecorti81

Using splice(0,0,… when adding parser allow to set priority at new defined parsers.

e.g. if I add a parser for European dates

Date.defileParser("%d/%m/%Y");

without this change all strings with the day under 13th of month, like 09/02/2012, will be parsed in the american date, the example will be 2 September 2012, not 9 February 2012.

@danielecorti81 danielecorti81 Using splice(0,0,… when adding parser allow to set priority at new de…
…fined parsers.

e.g. if I add a parser for European dates

Date.defileParser("%d/%m/%Y");

without this change all strings with the day under 13th of month, like 09/02/2012, will be parsed in the american date, the example will be 2 September 2012, not 9 February 2012.
9bd3a90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.