Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8672603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:14:45+00:00 2026-06-12T19:14:45+00:00

Just idly wondering really, the DateTime class in the awesome JodaTime library has a

  • 0

Just idly wondering really, the DateTime class in the awesome JodaTime library has a

minus(long millis)

method, which returns a new DateTime object minus the specified number of milliseconds, so why would I ever need the

minusMillis(int millis)

method, which does the same but with an Integer number of milliseconds? Integer.MAX_VALUE in milliseconds is only 24 days, which isn’t that helpful, and presumably it just converts the int to a long and pumps it into the other method anyway?

The JodaTime library is so well written that I figure there’s probably a reason that I’m missing.

http://joda-time.sourceforge.net/api-release/org/joda/time/DateTime.html#minusMillis(int)

EDIT: To clarify, I’m wondering why I should use the minusMillis(int) method – I understand what the more powerful minus(long) method is for.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:14:47+00:00Added an answer on June 12, 2026 at 7:14 pm

    I suspect its because in version 1.0 there way only the minus(long duration) method but in version 1.1 there was minusXxxx(int units) added resulting in minusMillis(int) being add for consistency and minus(long) was not removed for back-ward compatibility.

    BTW: there is a plus(long duration) and a plusMillis(int millis) for, I imagine, the same reasons.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering: I'm trying to set up an adaptive image handler in Coldfusion8, which
Just wondering what the best (fastest execution time) method for translating the following SQL
Just wondering if anyone has any experience on how to deploy a JRuby application
Just wondering. I have a page in Jquery Mobile which uses a popup that
Just wondering if someone has sample code to return the top 25 links of
Just downloaded highstock 1.1.6. The js directory includes a modules folder, which has a
Just wondering if anyone has an idea as to how I might re-create a
just wanted to ask where I define initial class properties? From other languages I
Just a knowledge question which I would like to ask: For example, I have
just wondering if there is a way to reduce the amount of code needed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.