-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated: all day/time functions now use SI_Symbol method properly.
- Loading branch information
Showing
6 changed files
with
56 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
module.exports = async d => { | ||
const {code} = d.util.aoiFunc(d); | ||
const { FormatOptions } = require("../../utils/Constants"); | ||
|
||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
const date = new Date(new Date().toLocaleString('en-us', { timeZone: d.timezone })); | ||
const formattedOptions = FormatOptions(date); | ||
|
||
data.result = formattedOptions.DD; | ||
|
||
return { | ||
code: d.util.setCode({function: d.func, code, result: new Date().getDate()}) | ||
} | ||
} | ||
code: d.util.setCode(data) | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
module.exports = async d => { | ||
const {code} = d.util.aoiFunc(d); | ||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
|
||
data.result = Date.now(); | ||
|
||
return { | ||
code: d.util.setCode({function: d.func, code, result: Date.now()}) | ||
} | ||
code: d.util.setCode(data) | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
module.exports = async d => { | ||
const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; | ||
const {code} = d.util.aoiFunc(d); | ||
const {FormatOptions} = require("../../utils/Constants"); | ||
|
||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
const date = new Date(new Date().toLocaleString('en-us', { timeZone: d.timezone })); | ||
const formattedOptions = FormatOptions(date); | ||
|
||
data.result = formattedOptions.dddd; | ||
|
||
return { | ||
code: d.util.setCode({function: d.func, code, result: days[new Date().getDay()]}) | ||
} | ||
} | ||
code: d.util.setCode(data) | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
module.exports = d => { | ||
const {FormatOptions} = require("../../utils/Constants"); | ||
|
||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
const date = new Date(new Date().toLocaleString('en-us', { timeZone: d.timezone })); | ||
const formattedOptions = FormatOptions(date); | ||
|
||
data.result = formattedOptions.H; | ||
|
||
data.result = new Date(new Date().toLocaleString('en-us', {timeZone: d.timezone})).getHours(); | ||
return { | ||
code: d.util.setCode(data) | ||
} | ||
} | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
module.exports = d => { | ||
let data = d.util.aoiFunc(d); | ||
const months = ['january', 'febuary', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] | ||
data.result = months[new Date(new Date().toLocaleString('en-us', {timeZone: d.timezone})).getMonth()]; | ||
const {FormatOptions} = require("../../utils/Constants"); | ||
|
||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
const date = new Date(new Date().toLocaleString('en-us', { timeZone: d.timezone })); | ||
const formattedOptions = FormatOptions(date); | ||
|
||
data.result = formattedOptions.MMMM; | ||
|
||
return { | ||
code: d.util.setCode(data) | ||
} | ||
} | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
module.exports = d => { | ||
const {FormatOptions} = require("../../utils/Constants"); | ||
|
||
module.exports = (d) => { | ||
const data = d.util.aoiFunc(d); | ||
const date = new Date(new Date().toLocaleString('en-us', { timeZone: d.timezone })); | ||
const formattedOptions = FormatOptions(date); | ||
|
||
data.result = formattedOptions.YYYY; | ||
|
||
data.result = new Date(new Date().toLocaleString('en-us', {timeZone: d.timezone})).getFullYear(); | ||
return { | ||
code: d.util.setCode(data) | ||
} | ||
} | ||
}; | ||
}; |