File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
apps/site/components/Releases/ReleaseSchedule Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,16 @@ import provideReleaseSchedule from '#site/next-data/providers/releaseSchedule';
44
55import type { FC } from 'react' ;
66
7+ const MONTH = 30 * 24 * 3_600_000 ;
8+
79const ReleaseSchedule : FC = async ( ) => {
810 const schedule = await provideReleaseSchedule ( ) ;
911
10- const now = new Date ( ) ;
11-
12- const threeMonthsAgo = new Date ( now ) ;
13- threeMonthsAgo . setMonth ( now . getMonth ( ) - 3 ) ;
12+ // eslint-disable-next-line react-hooks/purity
13+ const now = Date . now ( ) ;
1414
15- const sixMonthsFromNow = new Date ( ) ;
16- sixMonthsFromNow . setMonth ( now . getMonth ( ) + 6 ) ;
15+ const threeMonthsAgo = new Date ( now - 3 * MONTH ) ;
16+ const sixMonthsFromNow = new Date ( now + 6 * MONTH ) ;
1717
1818 const svg = create ( {
1919 data : schedule ,
You can’t perform that action at this time.
0 commit comments