fix(smarttime.units): Fix issue in getMilliSecondsAsHumanReadableAgoTime
This commit is contained in:
parent
bfa00feadd
commit
6e7f8f3dda
@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2024-12-13 - 4.1.1 - fix(smarttime.units)
|
||||||
|
Fix issue in getMilliSecondsAsHumanReadableAgoTime
|
||||||
|
|
||||||
|
- Corrected the parameter type passed to date-fns.formatDistanceToNow within getMilliSecondsAsHumanReadableAgoTime function.
|
||||||
|
|
||||||
## 2024-12-13 - 4.1.0 - feat(smarttime.units)
|
## 2024-12-13 - 4.1.0 - feat(smarttime.units)
|
||||||
Add function to get human-readable time ago string from milliseconds.
|
Add function to get human-readable time ago string from milliseconds.
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smarttime',
|
name: '@push.rocks/smarttime',
|
||||||
version: '4.1.0',
|
version: '4.1.1',
|
||||||
description: 'Provides utilities for advanced time handling including cron jobs, timestamps, intervals, and more.'
|
description: 'Provides utilities for advanced time handling including cron jobs, timestamps, intervals, and more.'
|
||||||
}
|
}
|
||||||
|
@ -69,5 +69,5 @@ export const getMilliSecondsAsHumanReadableString = (milliSecondsArg: number): s
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getMilliSecondsAsHumanReadableAgoTime = (timeStampArg: number): string => {
|
export const getMilliSecondsAsHumanReadableAgoTime = (timeStampArg: number): string => {
|
||||||
return plugins.dateFns.formatDistanceToNow(timeStampArg);
|
return plugins.dateFns.formatDistanceToNow(new Date(timeStampArg));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user