time constants implemented as global file

This commit is contained in:
Luis Fernando Molina committed 2020-11-27 14:54:52 +01:00
1 parent 658dc4714a
commit 09f043fb51
13 files changed
+44 -33

No files matched your search

+5 -5
View File
@@ -220,7 +220,7 @@
let system = { // These are the available system variables to be used in User Code and Formulas
timeFrame: timeFrame,
ONE_DAY_IN_MILISECONDS: global.ONE_DAY_IN_MILISECONDS
ONE_DAY_IN_MILISECONDS: TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS
}
let variable = {} // This is the structure where the user will define its own variables that will be shared across different code blocks and formulas.
let results = []
@@ -311,8 +311,8 @@
let yesterday = {}
let system = { // These are the available system variables to be used in User Code and Formulas
timeFrame: timeFrame,
ONE_DAY_IN_MILISECONDS: global.ONE_DAY_IN_MILISECONDS,
ONE_MIN_IN_MILISECONDS: global.ONE_MIN_IN_MILISECONDS
ONE_DAY_IN_MILISECONDS: TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS,
ONE_MIN_IN_MILISECONDS: TS.projects.superalgos.globals.timeConstants.ONE_MIN_IN_MILISECONDS
}
let variable = {} // This is the structure where the user will define its own variables that will be shared across different code blocks and formulas.
let results = []
@@ -361,7 +361,7 @@
if (processingDailyFiles) {
/* Initialization of Last Instance */
lastInstantOfTheDay = currentDay.valueOf() + global.ONE_DAY_IN_MILISECONDS - 1;
lastInstantOfTheDay = currentDay.valueOf() + TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS - 1;
if (interExecutionMemory[productName] === undefined) {
/* The first time the intialization variables goes to the Inter Execution Memory. */
@@ -469,7 +469,7 @@
at the next day, in whole, even if it starts in the previous day.
*/
let lastInstantOdDay = currentDay.valueOf() + global.ONE_DAY_IN_MILISECONDS - 1;
let lastInstantOdDay = currentDay.valueOf() + TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS - 1;
if (record.end < currentDay.valueOf() - 1) { continue; }
if (record.end === lastInstantOdDay) { continue; }