
// http://stackoverflow.com/a/16714931/861745
function fnYYYY_MM_DD(objDate) {
	if (objDate === undefined) {
		objDate = new Date();
	}
	return objDate.toISOString().slice(0,10);
}

// if this file is run directly, do the following:
if (require.main === module) {
	console.log( fnYYYY_MM_DD() );
}

@@ -235,34 +235,157 @@
 if (
-require.main === module) %7B
+typeof require == %22undefined%22 %7C%7C require.main === module) %7B%0A%09// do the following only if file run directly with node or if it is run in the browser. 
 %0A%09co

Update YYYY-MM-DD.js