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
/** | |
* Convert Strings from camelCase to kebab-case | |
* @returns {string} | |
* @param input | |
*/ | |
static camelToKebab(input: string) { | |
return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | |
} | |
/** |
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
/** | |
* Get the last full our of given date or now | |
*/ | |
function getPrevFullHour(date) { | |
if (!date) { | |
date = new Date(); | |
} | |
var copiedDate = new Date(date); | |
copiedDate.setMinutes(0); |
OlderNewer