style: auto-fix lint and format
This commit is contained in:
1 parent
7847eea1a3
commit
30344bdaae
3 files changed
+7
-6
No files matched your search
@@ -9,7 +9,10 @@ interface LocalizedTimeOptions {
|
||||
}
|
||||
|
||||
const toValidDate = (value: LocalizedDateValue): Date | undefined => {
|
||||
const date = value instanceof Date ? value : new Date(typeof value === "string" && dateOnlyPattern.test(value) ? `${value}T00:00:00Z` : value);
|
||||
const date =
|
||||
value instanceof Date
|
||||
? value
|
||||
: new Date(typeof value === "string" && dateOnlyPattern.test(value) ? `${value}T00:00:00Z` : value);
|
||||
return Number.isNaN(date.getTime()) ? undefined : date;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user