Created
July 10, 2018 20:25
-
-
Save Bajena/3192e89be600df52904f9ffd0577e265 to your computer and use it in GitHub Desktop.
Date utils for GDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DateUtils = { | |
/* | |
* Converts Date object to a String containing the date part (with dashes). | |
* | |
* @return {String} Date part. E.g. '2018-07-10'. | |
*/ | |
getDatePart: function(dateObject) { | |
return dateObject.toISOString().slice(0, 10); | |
} | |
} | |
var module = module || {}; | |
module.exports = DateUtils; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment