File tree 1 file changed +12
-2
lines changed
components/dashboard/src/teams
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import {
16
16
} from "@gitpod/gitpod-protocol/lib/usage" ;
17
17
import { AttributionId } from "@gitpod/gitpod-protocol/lib/attribution" ;
18
18
import { Item , ItemField , ItemsList } from "../components/ItemsList" ;
19
- import moment from "moment" ;
20
19
import Pagination from "../Pagination/Pagination" ;
21
20
import Header from "../components/Header" ;
22
21
import { ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error" ;
@@ -139,6 +138,17 @@ function TeamUsage() {
139
138
return rows ;
140
139
} ;
141
140
141
+ const displayTime = ( time : string ) => {
142
+ const options : Intl . DateTimeFormatOptions = {
143
+ day : "numeric" ,
144
+ month : "long" ,
145
+ year : "numeric" ,
146
+ hour : "numeric" ,
147
+ minute : "numeric" ,
148
+ } ;
149
+ return new Date ( time ) . toLocaleDateString ( undefined , options ) . replace ( "at " , "" ) ;
150
+ } ;
151
+
142
152
const lastResultOnCurrentPage = currentPage * resultsPerPage ;
143
153
const firstResultOnCurrentPage = lastResultOnCurrentPage - resultsPerPage ;
144
154
const totalNumberOfPages = Math . ceil ( billedUsage . length / resultsPerPage ) ;
@@ -250,7 +260,7 @@ function TeamUsage() {
250
260
</ div >
251
261
< div className = "my-auto" >
252
262
< span className = "text-gray-400" >
253
- { moment ( new Date ( usage . startTime ) . toDateString ( ) ) . fromNow ( ) }
263
+ { displayTime ( usage . startTime ) }
254
264
</ span >
255
265
</ div >
256
266
</ div >
You can’t perform that action at this time.
0 commit comments