[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [recommenders-dev] DateFormat
- From: Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx>
- Date: Wed, 29 May 2013 17:19:51 +0200
- Delivered-to: firstname.lastname@example.org
- Organization: Codetrails
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
> 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.
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company
Robert-Bosch-Str. 7, 64293 Darmstadt
Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940