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
export function fn_getTimeStamp(): Object { | |
// Create a date object with the current time | |
let now: Date = new Date(); | |
// Create an array with the current month, day and time | |
let date: Array<String> = [ String(now.getMonth() + 1), String(now.getDate()), String(now.getFullYear()) ]; | |
// Create an array with the current hour, minute and second | |
let time: Array<String> = [ String(now.getHours()), String(now.getMinutes())]; | |
// If seconds and minutes are less than 10, add a zero | |
for (let i of time) { | |
if ( Number(i) < 10 ) { |