Convert US date to EU date | Sololearn: Learn to code for FREE!


Convert US date to EU date

The code works but I was wondering if there's a easier way to solve it, I feel like I wrote a lot of code to a problem that could have been solved in a easier way

1/10/2021 2:54:23 AM

Itzel Medina

7 Answers

New Answer


Hi Itzel Medina , 🙂 This will be good for you 🐾


AKSHAY [less active] Is my solution wrong? 🤔 What about solving it with HTML? I am not sure. 🤔


date_EU = date_US + 500 years


Jan Markus I think your solution is right. Solving with HTML 🤔🤔...... I am not working on HTML currently🤷🏻‍♂️, but you can try


Jan Markus do you have any reason to believe so? 🤔


P∆WAN M∆URY∆, your solution is good, but it seems to me that it can be slightly improved by optimizing the date patterns and try-catch constructions. My code:


Thanks! I'll try that 🙏