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 CHANGED
@@ -2598,7 +2598,7 @@ const getMonthName = (month) => {
2598
2598
  * @author Gabe Abrams
2599
2599
  * @param [dateOrTimestamp=now] the date to get info on or a ms since epoch timestamp
2600
2600
  * @returns object with timestamp (ms since epoch) and numbers
2601
- * corresponding to ET time values for year, month, day, hour, hour12, minute, isPM
2601
+ * corresponding to ET time values for year, month, day, hour, hour12, minute, second, isPM
2602
2602
  * where hour is in 24hr time and hour12 is in 12hr time.
2603
2603
  */
2604
2604
  const getTimeInfoInET = (dateOrTimestamp) => {
@@ -2628,6 +2628,9 @@ const getTimeInfoInET = (dateOrTimestamp) => {
2628
2628
  const month = Number.parseInt(monthStr, 10);
2629
2629
  const day = Number.parseInt(dayStr, 10);
2630
2630
  const minute = Number.parseInt(minStr, 10);
2631
+ const second = (ending.split(' ')[0]
2632
+ ? Number.parseInt(ending.split(' ')[0], 10)
2633
+ : 0);
2631
2634
  const hour12 = Number.parseInt(hourStr, 10);
2632
2635
  // Convert from am/pm to 24hr
2633
2636
  const isAM = ending.toLowerCase().includes('am');
@@ -2649,6 +2652,7 @@ const getTimeInfoInET = (dateOrTimestamp) => {
2649
2652
  hour12,
2650
2653
  isPM,
2651
2654
  minute,
2655
+ second,
2652
2656
  };
2653
2657
  };
2654
2658