The most ridiculous thing ever wrote…

// Expects ‘theDate’ in YYYY-MM-DD Format
String timeSince(String theDate) throws Exception (
       int theYear = Integer.parseInt(theDate.substring(0,4));
       int theMonth = Integer.parseInt(theDate.substring(5,7));
       int theDay = Integer.parseInt(theDate.substring(8));
       return Integer.toString(theYear)+”-” +Integer.toString(theMonth)+”-” +Integer.toString(theDay);
)

I did actually have a sane reason for writing this, and it didn’t end up in any actual working programs, but it’s still pretty hilarious no? (Hilarious that is if you can read Java – which you probably can’t 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami