* [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
9 lines
243 B
TypeScript
9 lines
243 B
TypeScript
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);
|
|
};
|