style: auto-fix lint and format
This commit is contained in:
1 parent
77cbd9f723
commit
19befee8a5
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