Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				But when the function finally returns the date, it isn't the date of tomorrow anymore but the date of today, is it?🤔🤔
 
 (Legendary function)
- 
				
				@Johnnyrook Simple, pass a negative integer to sleep, then the function will execute before you write the code.
- 
				
				 Shodan4918yAm I doing this right? Shodan4918yAm I doing this right?
 
 int getTomorrowsDate(int isItTomorrowYet = 0) {
 if (isItTomorrowYet < 1000*60*60*24) {
 sleep(1);
 return getTomorrowsDate(++isItTomorrowYet);
 } else {
 return getCurrentDate();
 }
 }
- 
				
				 mac-aga20408yIf you were a real Dev , you would procrastinate the work till tomorrow and display “today’s “ date 😂 mac-aga20408yIf you were a real Dev , you would procrastinate the work till tomorrow and display “today’s “ date 😂
- 
				
				 Shodan4918y@Ranguna Exactly, "but why?". The joke in this rant is about roundabout ways to do simple things. I just tried to amplify that. Shodan4918y@Ranguna Exactly, "but why?". The joke in this rant is about roundabout ways to do simple things. I just tried to amplify that.












Manager: Write a function to get tomorrow's date.
Kids:
int getTomorrowsDate() {
return getCurrentDate() + 1;
}
Legends:
int getTomorrowsDate() {
sleep(1000*60*60*24);
return getCurrentDate();
}
undefined
thug life.