File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11export type PostMetadata = {
2- title : string
3- description : string
4- posted : Date
5- tags : string [ ]
6- slug ? : string
2+ title ? : string
3+ description ? : string
4+ date ?: string
5+ tags ? : string [ ]
6+ slug : string
77}
88
99export type PostData = {
Original file line number Diff line number Diff line change @@ -5,10 +5,17 @@ export function cn(...inputs: ClassValue[]) {
55 return twMerge ( clsx ( inputs ) ) ;
66}
77
8- export const formattedDate = ( d : Date ) : string => {
8+ export const formatDate = ( d : Date ) : string => {
99 return new Intl . DateTimeFormat ( 'en-US' , {
1010 month : 'short' ,
1111 day : '2-digit' ,
1212 year : 'numeric'
1313 } ) . format ( d ) ;
1414} ;
15+
16+ export const formatShortDate = ( d : Date ) : string => {
17+ return new Intl . DateTimeFormat ( 'en-US' , {
18+ month : 'long' ,
19+ day : '2-digit' ,
20+ } ) . format ( d ) ;
21+ } ;
You can’t perform that action at this time.
0 commit comments