UNPKG

web-collect-events-narayana

Version:

An sdk for collecting events from web pages

16 lines (15 loc) 569 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function getDateTimeIndex() { const dateTimeIndex = {}; const now = new Date(); // Retrieve date and time information dateTimeIndex.year = now.getFullYear(); dateTimeIndex.month = now.getMonth() + 1; // Months are zero-based, so add 1 dateTimeIndex.day = now.getDate(); dateTimeIndex.hours = now.getHours(); dateTimeIndex.minutes = now.getMinutes(); dateTimeIndex.seconds = now.getSeconds(); return dateTimeIndex; } exports.default = getDateTimeIndex;