feat: classroomio blog v1 (#142)
* style: Improved font size of the answers in the FAQ section of the landing page * working on the classroomio blog * there is a bit of a git issue * changed the footer route * Merge branch 'main' into issue-139 * Added syntax higlighting,blockquotes styling and image stylings * restyle and add first blog * make tagline match home page * add docs route --------- Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];
|
||||
|
||||
export function formatDate(date: string, dateStyle: DateStyle = 'medium', locales = 'en') {
|
||||
// Safari is mad about dashes in the date
|
||||
const dateToFormat = new Date(date.replaceAll('-', '/'));
|
||||
const dateFormatter = new Intl.DateTimeFormat(locales, { dateStyle });
|
||||
return dateFormatter.format(dateToFormat);
|
||||
}
|
||||
Reference in New Issue
Block a user