File tree Expand file tree Collapse file tree 3 files changed +2748
-5459
lines changed
Expand file tree Collapse file tree 3 files changed +2748
-5459
lines changed Original file line number Diff line number Diff line change 1- import { DateTime } from "luxon" ;
21import invariant from "tiny-invariant" ;
32import { LRUCache } from "lru-cache" ;
43import yaml from "yaml" ;
@@ -100,15 +99,10 @@ function getValidAuthorNames(authorNames: string[]) {
10099}
101100
102101function formatDate ( date : Date ) {
103- let offset = new Date ( ) . getTimezoneOffset ( ) ;
104- return (
105- DateTime . fromJSDate ( date )
106- // Necessary to set the offset for local development
107- . plus ( { minutes : offset } )
108- . toLocaleString ( DateTime . DATE_FULL , {
109- locale : "en-US" ,
110- } )
111- ) ;
102+ return new Intl . DateTimeFormat ( "en-US" , {
103+ dateStyle : "long" ,
104+ timeZone : "America/New_York" ,
105+ } ) . format ( date ) ;
112106}
113107
114108/**
Original file line number Diff line number Diff line change 3838 "front-matter" : " ^4.0.2" ,
3939 "isbot" : " ^4" ,
4040 "lru-cache" : " ^10.1.0" ,
41- "luxon" : " ^3.7.2" ,
4241 "parse-numeric-range" : " ^1.3.0" ,
4342 "react" : " ^18.3.1" ,
4443 "react-dom" : " ^18.3.1" ,
6867 "@testing-library/jest-dom" : " ^6.9.1" ,
6968 "@types/eslint" : " ^9.6.1" ,
7069 "@types/hast" : " ^3.0.4" ,
71- "@types/luxon" : " ^3.7.1" ,
7270 "@types/node" : " ^24.10.13" ,
7371 "@types/react" : " ^18.3.28" ,
7472 "@types/react-dom" : " ^18.3.7" ,
You can’t perform that action at this time.
0 commit comments