[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] DateFormat

Hi Timur,

> I want convert the date format; I have a CompletionEvent with
> sessionEnded (long) and want convert this into mins, hours, days etc.
> 
> Similar like the git history view --> column: commited date.
> What I have to do for this conversion?
> 
> At the moment I convert only to the default date format (e.g. 2013-05-15): 
> format("%tF", new Date(completionEvent.sessionEnded))

here's some general advice if you want to know how something was
implemented elsewhere: Look at the source code. In particular for UI
contributions like preference pages or views, where you want to recreate
the look and feel, having a look at the source is a good way forward.

So, just (temporarily) add the EGit UI bundle to your project's
classpath, browse into the JAR (maybe open the plugin.xml to see which
extension points the bundle implements where), and open the *.class file
(in most cases this should bring you to the linked source file). Then,
try to figure out how others approached this problem.

Hope this helps in this case as well.

Andreas
-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940