Skip to content

Commit

Permalink
sort with most recent period first
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Sep 6, 2023
1 parent 74455a7 commit 547dfa8
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 89 deletions.
2 changes: 1 addition & 1 deletion validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test(self):

date = datetime.datetime.strptime(p['effective_from'].replace('0000', '2000'), '%Y-%m-%d')
if prev:
self.assertGreater(date, prev, "effective_from dates for {} are not sorted chronologically".format(country))
self.assertLess(date, prev, "periods for {} are not sorted with most recent period first".format(country))
prev = date


Expand Down
176 changes: 88 additions & 88 deletions vat-rates.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
],
"IE": [
{
"effective_from": "0000-01-01",
"effective_from": "2021-03-01",
"rates": {
"super_reduced": 4.8,
"reduced1": 9,
Expand All @@ -148,7 +148,7 @@
}
},
{
"effective_from": "2021-03-01",
"effective_from": "0000-01-01",
"rates": {
"super_reduced": 4.8,
"reduced1": 9,
Expand Down Expand Up @@ -198,23 +198,21 @@
],
"LU": [
{
"effective_from": "0000-01-01",
"effective_from": "2024-01-01",
"rates": {
"super_reduced": 3,
"reduced1": 6,
"reduced2": 12,
"standard": 15,
"parking": 12
"reduced1": 8,
"standard": 17,
"parking": 13
}
},
{
"effective_from": "2015-01-01",
"effective_from": "2023-01-01",
"rates": {
"super_reduced": 3,
"reduced1": 8,
"reduced2": 14,
"standard": 17,
"parking": 12
"reduced1": 7,
"standard": 16,
"parking": 13
}
},
{
Expand All @@ -227,31 +225,33 @@
}
},
{
"effective_from": "2023-01-01",
"effective_from": "2015-01-01",
"rates": {
"super_reduced": 3,
"reduced1": 7,
"standard": 16,
"parking": 13
"reduced1": 8,
"reduced2": 14,
"standard": 17,
"parking": 12
}
},
{
"effective_from": "2024-01-01",
"effective_from": "0000-01-01",
"rates": {
"super_reduced": 3,
"reduced1": 8,
"standard": 17,
"parking": 13
"reduced1": 6,
"reduced2": 12,
"standard": 15,
"parking": 12
}
}
],
"RO": [
{
"effective_from": "0000-01-01",
"effective_from": "2017-01-01",
"rates": {
"reduced1": 5,
"reduced2": 9,
"standard": 24
"standard": 19
}
},
{
Expand All @@ -263,54 +263,38 @@
}
},
{
"effective_from": "2017-01-01",
"effective_from": "0000-01-01",
"rates": {
"reduced1": 5,
"reduced2": 9,
"standard": 19
"standard": 24
}
}
],
"EE": [
{
"effective_from": "0000-01-01",
"rates": {
"reduced": 9,
"standard": 20
}
},
{
"effective_from": "2024-01-01",
"rates": {
"reduced": 9,
"standard": 22
}
},
{
"effective_from": "2025-01-01",
"rates": {
"reduced": 13,
"standard": 22
}
}
],
"GR": [
{
"effective_from": "0000-01-01",
"effective_from": "2025-01-01",
"rates": {
"reduced1": 6.5,
"reduced2": 13,
"standard": 23
"reduced": 13,
"standard": 22
}
},
{
"effective_from": "2016-01-01",
"effective_from": "2024-01-01",
"rates": {
"reduced1": 6,
"reduced2": 13.5,
"standard": 23
"reduced": 9,
"standard": 22
}
},
{
"effective_from": "0000-01-01",
"rates": {
"reduced": 9,
"standard": 20
}
}
],
"GR": [
{
"effective_from": "2016-06-01",
"rates": {
Expand All @@ -325,6 +309,22 @@
"standard": 0
}
]
},
{
"effective_from": "2016-01-01",
"rates": {
"reduced1": 6,
"reduced2": 13.5,
"standard": 23
}
},
{
"effective_from": "0000-01-01",
"rates": {
"reduced1": 6.5,
"reduced2": 13,
"standard": 23
}
}
],
"LT": [
Expand All @@ -338,23 +338,6 @@
}
],
"FR": [
{
"effective_from": "0000-01-01",
"rates": {
"super_reduced": 2.1,
"reduced1": 5.5,
"standard": 19.6
}
},
{
"effective_from": "2012-01-01",
"rates": {
"super_reduced": 2.1,
"reduced1": 5.5,
"reduced2": 7,
"standard": 19.6
}
},
{
"effective_from": "2014-01-01",
"rates": {
Expand Down Expand Up @@ -390,6 +373,23 @@
"standard": 0
}
]
},
{
"effective_from": "2012-01-01",
"rates": {
"super_reduced": 2.1,
"reduced1": 5.5,
"reduced2": 7,
"standard": 19.6
}
},
{
"effective_from": "0000-01-01",
"rates": {
"super_reduced": 2.1,
"reduced1": 5.5,
"standard": 19.6
}
}
],
"HR": [
Expand All @@ -415,10 +415,10 @@
],
"NL": [
{
"effective_from": "0000-01-01",
"effective_from": "2019-01-01",
"rates": {
"reduced": 6,
"standard": 19
"reduced": 9,
"standard": 21
}
},
{
Expand All @@ -429,10 +429,10 @@
}
},
{
"effective_from": "2019-01-01",
"effective_from": "0000-01-01",
"rates": {
"reduced": 9,
"standard": 21
"reduced": 6,
"standard": 19
}
}
],
Expand All @@ -447,7 +447,7 @@
],
"DE": [
{
"effective_from": "0000-01-01",
"effective_from": "2021-01-01",
"rates": {
"reduced": 7,
"standard": 19
Expand Down Expand Up @@ -485,7 +485,7 @@
]
},
{
"effective_from": "2021-01-01",
"effective_from": "0000-01-01",
"rates": {
"reduced": 7,
"standard": 19
Expand Down Expand Up @@ -528,14 +528,6 @@
}
],
"AT": [
{
"effective_from": "0000-01-01",
"rates": {
"reduced": 10,
"standard": 20,
"parking": 12
}
},
{
"effective_from": "2016-01-01",
"rates": {
Expand All @@ -556,6 +548,14 @@
"standard": 19
}
]
},
{
"effective_from": "0000-01-01",
"rates": {
"reduced": 10,
"standard": 20,
"parking": 12
}
}
]
}
Expand Down

0 comments on commit 547dfa8

Please sign in to comment.