We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ced4834 commit bee33bcCopy full SHA for bee33bc
docs/docs/functions/dates/format-date.mdx
@@ -0,0 +1,27 @@
1
+---
2
+title: formatDate
3
4
+
5
+Formats a date value into a localized string representation using the `toLocaleDateString()` method.
6
7
+### API
8
9
+```typescript
10
+interface IFormatDateConfig {
11
+ date: ConstructorParameters<typeof Date>[0];
12
+ locales?: Intl.LocalesArgument;
13
+ options?: Intl.DateTimeFormatOptions;
14
+}
15
16
+function formatDate(config: IFormatDateConfig): string;
17
+```
18
19
+### Usage
20
21
22
+import { formatDate } from "@feedzai/js-utilities";
23
24
+const formattedDate = formatDate({ date: "2023-12-25" });
25
26
+console.log(formattedDate); // "December 25"
27
0 commit comments