dce-reactkit 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/helpers/getTimeInfoInET.d.ts +2 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/helpers/getTimeInfoInET.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/helpers/getTimeInfoInET.ts +8 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Gabe Abrams
|
|
5
5
|
* @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
|
|
6
6
|
* @returns object with timestamp (ms since epoch) and numbers
|
|
7
|
-
* corresponding to ET time values for year, month, day, hour, hour12, minute, isPM
|
|
7
|
+
* corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
|
|
8
8
|
* where hour is in 24hr time and hour12 is in 12hr time.
|
|
9
9
|
*/
|
|
10
10
|
declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
|
|
@@ -15,6 +15,7 @@ declare const getTimeInfoInET: (dateOrTimestamp?: Date | number) => {
|
|
|
15
15
|
hour: number;
|
|
16
16
|
hour12: number;
|
|
17
17
|
minute: number;
|
|
18
|
+
second: number;
|
|
18
19
|
isPM: boolean;
|
|
19
20
|
};
|
|
20
21
|
export default getTimeInfoInET;
|
package/dist/esm/index.js
CHANGED
|
@@ -2571,7 +2571,7 @@ const getMonthName = (month) => {
|
|
|
2571
2571
|
* @author Gabe Abrams
|
|
2572
2572
|
* @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
|
|
2573
2573
|
* @returns object with timestamp (ms since epoch) and numbers
|
|
2574
|
-
* corresponding to ET time values for year, month, day, hour, hour12, minute, isPM
|
|
2574
|
+
* corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
|
|
2575
2575
|
* where hour is in 24hr time and hour12 is in 12hr time.
|
|
2576
2576
|
*/
|
|
2577
2577
|
const getTimeInfoInET = (dateOrTimestamp) => {
|
|
@@ -2601,6 +2601,9 @@ const getTimeInfoInET = (dateOrTimestamp) => {
|
|
|
2601
2601
|
const month = Number.parseInt(monthStr, 10);
|
|
2602
2602
|
const day = Number.parseInt(dayStr, 10);
|
|
2603
2603
|
const minute = Number.parseInt(minStr, 10);
|
|
2604
|
+
const second = (ending.split(' ')[0]
|
|
2605
|
+
? Number.parseInt(ending.split(' ')[0], 10)
|
|
2606
|
+
: 0);
|
|
2604
2607
|
const hour12 = Number.parseInt(hourStr, 10);
|
|
2605
2608
|
// Convert from am/pm to 24hr
|
|
2606
2609
|
const isAM = ending.toLowerCase().includes('am');
|
|
@@ -2622,6 +2625,7 @@ const getTimeInfoInET = (dateOrTimestamp) => {
|
|
|
2622
2625
|
hour12,
|
|
2623
2626
|
isPM,
|
|
2624
2627
|
minute,
|
|
2628
|
+
second,
|
|
2625
2629
|
};
|
|
2626
2630
|
};
|
|
2627
2631
|
|