From 9ad83acd088e77241ff83ba28a04eb53726bff54 Mon Sep 17 00:00:00 2001 From: koksnuss Date: Mon, 11 May 2020 10:50:50 +0200 Subject: [PATCH] add century datetime bug --- coinmanager/coinc/static/coinc/main.js | 2 +- coinmanager/coinc/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coinmanager/coinc/static/coinc/main.js b/coinmanager/coinc/static/coinc/main.js index a63e474..2a3ded2 100644 --- a/coinmanager/coinc/static/coinc/main.js +++ b/coinmanager/coinc/static/coinc/main.js @@ -178,7 +178,7 @@ $(document).ready(function() { let csrf_token = $('input[name=csrfmiddlewaretoken]').val(); let value = $(this).attr('value'); let year = Number($(this).parent('tr').attr('name')); - // TODO fix this before the end of 2098 +// TODO fix this before the end of 2098 year += (year == 99) ? 1900 : 2000; let country = $(this).parents('table').attr('name'); let stamp = $(this).parent('tr').attr('stamp'); diff --git a/coinmanager/coinc/views.py b/coinmanager/coinc/views.py index 2b08fbb..b6a8d3b 100644 --- a/coinmanager/coinc/views.py +++ b/coinmanager/coinc/views.py @@ -135,7 +135,7 @@ def show_coin(country, year, stamp, value): @param stamp: stamp_id @param value: int e [1,2,5,10,20,50,100,200,201,202,203] ''' - # TODO fix this before the end of 2098 +# TODO fix this before the end of 2098 year = int(year) if year == 99: year += 1900