[examples/openspending] - openspending v0.2 (#907)
* [examples/openspending] - openspending v0.2 * [examples/openspending][m] - fix build * [examples/openspending][xs] - fix build * [examples/openspending][xs] - add prebuild step * [examples/openspending][m] - fix requested by demenech * [examples/openspending][sm] - remove links + fix bug
This commit is contained in:
8
examples/openspending/utils/formatDate.tsx
Normal file
8
examples/openspending/utils/formatDate.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
export const formatDate = (date: string, locales = "en-US") => {
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
};
|
||||
return new Date(date).toLocaleDateString(locales, options);
|
||||
};
|
||||
Reference in New Issue
Block a user