Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339738 - [client] Show Time instead of Date for recently changed files
Summary: [client] Show Time instead of Date for recently changed files
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 0.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 13:14 EST by Paul Beusterien CLA
Modified: 2012-01-19 10:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.