mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
comments for getDate method
This commit is contained in:
parent
5a90cc0ccd
commit
f7dc1c7877
@ -201,6 +201,12 @@ export const checkIfDatesAreEqual = (
|
||||
return isEqual(parsedDate1, parsedDate2);
|
||||
};
|
||||
|
||||
/**
|
||||
* This method returns a date from string of type yyyy-mm-dd
|
||||
* This method is recommended to use instead of new Date() as this does not introduce any timezone offsets
|
||||
* @param date
|
||||
* @returns date or undefined
|
||||
*/
|
||||
export const getDate = (date: string | Date | undefined | null): Date | undefined => {
|
||||
if (!date || date === "") return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user