mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix relative date again
This commit is contained in:
		| @@ -42,9 +42,10 @@ describe('CustomDatePipe', () => { | |||||||
|     expect(datePipe.transform(notNow, 'relative')).toEqual('Yesterday') |     expect(datePipe.transform(notNow, 'relative')).toEqual('Yesterday') | ||||||
|     notNow.setDate(now.getDate()) |     notNow.setDate(now.getDate()) | ||||||
|     notNow.setMonth(now.getMonth() - 1) |     notNow.setMonth(now.getMonth() - 1) | ||||||
|     expect(datePipe.transform(notNow, 'relative')).toEqual( |     if (now.getMonth() === 0) { | ||||||
|       now.getMonth() > 1 ? 'Last month' : 'Last year' |       notNow.setFullYear(now.getFullYear() - 1) | ||||||
|     ) |     } | ||||||
|  |     expect(datePipe.transform(notNow, 'relative')).toEqual('Last month') | ||||||
|     expect(datePipe.transform(now, 'relative')).toEqual('Just now') |     expect(datePipe.transform(now, 'relative')).toEqual('Just now') | ||||||
|   }) |   }) | ||||||
| }) | }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon