@@ -2,6 +2,7 @@ import Link from '@docusaurus/Link';
22import { getReleaseBranches } from '../RabbitMQServerReleaseInfo' ;
33import styles from "./index.module.css"
44
5+ const releaseDateOptions = { year : 'numeric' , month : 'short' } ;
56const dateOptions = { year : 'numeric' , month : 'short' , day : 'numeric' } ;
67
78function getTimelineRows ( releaseBranches ) {
@@ -17,9 +18,16 @@ function getTimelineRows(releaseBranches) {
1718 continue ;
1819 }
1920
20- const patchRelease = releases [ 0 ] ;
21- const releaseDate = new Date ( patchRelease . release_date ) ;
22- const endOfCommunitySupportDate = previousReleaseDate ;
21+ const minorRelease = releases [ releases . length - 1 ] ;
22+ const releaseDate = new Date ( minorRelease . release_date ) ;
23+
24+ const endOfCommunitySupportDate =
25+ releaseBranch . end_of_community_support
26+ ? new Date (
27+ releaseBranch . end_of_community_support
28+ )
29+ : previousReleaseDate ;
30+
2331 const endOfCommercialSupportDate = new Date ( releaseBranch . end_of_support ) ;
2432
2533 const isCommunitySupported = endOfCommunitySupportDate === undefined || endOfCommunitySupportDate > now ;
@@ -33,15 +41,14 @@ function getTimelineRows(releaseBranches) {
3341
3442 rows . push ( {
3543 release : branch ,
36- patch : patchRelease . version ,
37- releaseDate : releaseDate . toLocaleDateString ( "en-GB" , dateOptions ) ,
44+ releaseDate : releaseDate . toLocaleDateString ( "en-GB" , releaseDateOptions ) ,
3845 endOfCommunitySupport,
3946 endOfCommercialSupport,
4047 isCommunitySupported,
4148 isCommercialSupported
4249 } ) ;
4350
44- previousReleaseDate = new Date ( releases [ releases . length - 1 ] . release_date ) ;
51+ previousReleaseDate = new Date ( minorRelease . release_date ) ;
4552 }
4653
4754 return rows ;
@@ -59,7 +66,6 @@ export function CommercialSupportTimelines() {
5966 < thead >
6067 < tr >
6168 < th > Release</ th >
62- < th > Patch</ th >
6369 < th > Date of Release</ th >
6470 < th > End of Community Support</ th >
6571 < th > End of Commercial Support*</ th >
@@ -69,7 +75,6 @@ export function CommercialSupportTimelines() {
6975 { rows . map ( ( row ) => (
7076 < tr key = { row . release } >
7177 < td > { row . release } </ td >
72- < td > { row . patch } </ td >
7378 < td > { row . releaseDate } </ td >
7479 < td className = { row . isCommunitySupported ? styles . supported : styles . unsupported } >
7580 { row . endOfCommunitySupport }
0 commit comments