• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DateTime

 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Any help would be great :-) Thanks

Is there any way in java to:

- have a Date (time) object created with today's date and time
- then we have string values for example:
1 second ago
12 seconds ago

1 minute ago
12 minutes ago

1 hour ago
16 hours ago

1 day ago
6 days ago

1 week ago
3 weeks ago

1 month ago
3 months ago

1 year ago
3 years ago

and the date object is returned less these items?

Cheers
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried to code anything?
What does your code look like?
What problems are you having?
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just thought that it might be possible already via joda?
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Niall Loughnane:
i just thought that it might be possible already via joda?



It might be. Have you tried it ?
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have looked around the javadoc and documentation on joda but couldn't see any so was wondering if anybody can send any pointers to it etc. :-)

Cheers
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seriously? The joda home page shows several examples of manipulating dates.
This community believes that one needs to Do Their Own Homework in order to learn. Show us some code. As us some questions. We don't just Churn Out Code.
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sound Thanks for the url :-)
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you may close topic - im just going to create my own interface

Cheers
 
reply
    Bookmark Topic Watch Topic
  • New Topic