mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
func description
This commit is contained in:
parent
c5b2b0ef24
commit
bb0b68f5cc
@ -16,6 +16,15 @@ export const getNowYesterdayInLong = (): number => {
|
|||||||
return dateToLong(getNowYesterday());
|
return dateToLong(getNowYesterday());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function takes in a unix timestamp, locale, timezone,
|
||||||
|
* and returns a dateTime string.
|
||||||
|
* If unixTimestamp is not provided, it returns 'Invalid time'
|
||||||
|
* @param unixTimestamp: number
|
||||||
|
* @param locale: string
|
||||||
|
* @param timezone: string
|
||||||
|
* @returns string - dateTime or 'Invalid time' if unixTimestamp is not provided
|
||||||
|
*/
|
||||||
export const formatUnixTimestampToDateTime = (unixTimestamp: number, locale: string, timezone: string): string => {
|
export const formatUnixTimestampToDateTime = (unixTimestamp: number, locale: string, timezone: string): string => {
|
||||||
if (isNaN(unixTimestamp)) {
|
if (isNaN(unixTimestamp)) {
|
||||||
return 'Invalid time';
|
return 'Invalid time';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user