Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339738

Summary: [client] Show Time instead of Date for recently changed files
Product: [ECD] Orion Reporter: Paul Beusterien <paul.beusterien>
Component: ClientAssignee: Project Inbox <e4.orion-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: bokowski
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Paul Beusterien CLA 2011-03-11 13:14:29 EST
org.eclipse.orion.client/bundles/org.eclipse.orion.client.core/static/js/explorer-table.js 
210c210
< 			th.innerHTML = "<h2>Date</h2>";
---
> 			th.innerHTML = "<h2>Date/Time</h2>";
310c310,317
< 				dateColumn.innerHTML = new Date(item.LocalTimeStamp).toLocaleDateString();
---
> 			    var fileDate = new Date(item.LocalTimeStamp);
> 			    var curDate = new Date();
> 			    var yesterday = new Date().setDate(curDate.getDate() - 1);
> 			    if (yesterday.valueOf() > fileDate.valueOf()) {
> 					dateColumn.innerHTML = fileDate.toLocaleDateString();
> 				} else {
> 					dateColumn.innerHTML = fileDate.toLocaleTimeString();
> 				}
Comment 1 Boris Bokowski CLA 2011-03-11 15:35:25 EST
Thanks for the contribution!
Comment 2 Paul Beusterien CLA 2011-03-11 16:42:53 EST
You're welcome. I don't have enough context for the assessing the value/need, so I'm fine for whatever priority is set for it. It was a good initial exercise to play with the code.