tasks/aws_s3.js
function (options, callback) {

			fs.stat(options.file_path, function (err, stats) {

				if (err) {
					callback(err);
				}
				else {
					var local_date = new Date(stats.mtime).getTime();
					var server_date = new Date(options.server_date).getTime();

					if (options.compare_date === 'newer') {
						callback(null, local_date > server_date);
					}
					else {
						callback(null, local_date < server_date);
					}
				}
			});
		}
function (options, callback) {

			fs.stat(options.file_path, function (err, stats) {

				if (err) {
					callback(err);
				}
				else {
					var local_date = new Date(stats.mtime).getTime();
					var server_date = new Date(options.server_date).getTime();

					if (options.compare_date === 'newer') {
						callback(null, local_date > server_date);
					}
					else {
						callback(null, local_date < server_date);
					}
				}
			});
		}
function ( options , callback ) { fs . stat ( options . file_path , function ( err , stats ) { if ( err ) { callback ( err ) ; } else { var local_date = new Date ( stats . mtime ) . getTime ( ) ; var server_date = new Date ( options . server_date ) . getTime ( ) ; if ( options . compare_date === 'newer' ) { callback ( null , local_date > server_date ) ; } else { callback ( null , local_date < server_date ) ; } } } ) ; }
Checks that local file is 'date_compare' than server file
Checks that local file is date_compare than server file