File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -173,12 +173,12 @@ export abstract class GitCommit {
173173
174174 @memoize ( )
175175 private get authorDateFormatter ( ) : Dates . DateFormatter {
176- return Dates . toFormatter ( this . authorDate ) ;
176+ return Dates . getFormatter ( this . authorDate ) ;
177177 }
178178
179179 @memoize ( )
180180 private get committerDateFormatter ( ) : Dates . DateFormatter {
181- return Dates . toFormatter ( this . committerDate ) ;
181+ return Dates . getFormatter ( this . committerDate ) ;
182182 }
183183
184184 private get dateFormatter ( ) : Dates . DateFormatter {
Original file line number Diff line number Diff line change @@ -16,11 +16,7 @@ export namespace Dates {
1616 format ( format : string ) : string ;
1717 }
1818
19- export function toFormatter ( date : Date ) : DateFormatter {
20- const wrappedDate = dayjs ( date ) ;
21- return {
22- fromNow : ( ) => wrappedDate . fromNow ( ) ,
23- format : ( format : string ) => wrappedDate . format ( format )
24- } ;
19+ export function getFormatter ( date : Date ) : DateFormatter {
20+ return dayjs ( date ) ;
2521 }
2622}
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ export class RepositoryNode extends SubscribeableViewNode<RepositoriesView> {
314314 format = `h:mma, ${ format } ` ;
315315 }
316316
317- return `${ options . prefix || '' } ${ Dates . toFormatter ( new Date ( this . _lastFetched ) ) . format ( format ) } ` ;
317+ return `${ options . prefix || '' } ${ Dates . getFormatter ( new Date ( this . _lastFetched ) ) . format ( format ) } ` ;
318318 }
319319
320320 // @debug ()
You can’t perform that action at this time.
0 commit comments