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 7628651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:37:57+00:00 2026-05-31T05:37:57+00:00

This is a simple question. does anyone know how to set up a date

  • 0

This is a simple question. does anyone know how to set up a date picker for the joda time. i have a date picker set up which is given in the Android tutorial, the method that the tutorial give to get the current date is the calender.get instance when putting the date i get into the joda time i get a weird reading of -20 between 1 march 2012 and 12 march 2012

this is the code i am using

    final Calendar c = Calendar.getInstance();
    mYear = c.get(Calendar.YEAR);
    mMonth = c.get(Calendar.MONTH);
    mDay = c.get(Calendar.DAY_OF_MONTH);
    Date past = new Date(112, 3, 1); // June 20th, 2010
    Date today = new Date(112, mMonth, mDay); // July 24th 
    int days = Days.daysBetween(new DateTime(past), new DateTime(today)).getDays();
    mDateDisplay.setText(""+days);
  • 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-05-31T05:37:58+00:00Added an answer on May 31, 2026 at 5:37 am
    Date past = new Date(112, 3, 1);
    

    That date represents 1st April 2012 – months are 0-based. (Jan = 0, Feb = 1, etc).

    I figure that 12th March is 20 days before 1st April, i.e., -20, so that would explain it.

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

Sidebar

Related Questions

HI folks! i got a simple question for coldfusion users, does anyone know how
This is, hopefully, a simple question: First, I would like to know if anyone
As an alternately to my real question: does anyone know of a simple command
Simple question - what does this actually do? var oq = (ObjectQuery<TEntity>)L2EQuery; return ExecuteFirstorDefault<TEntity>(oq,
* Simple question : Why does this function throw an exception when evaluated ?
this is a simple question. I have a form that is being validated using
Does anyone know how WebClient.DownloadFileAsync is implemented ? I have a few questions about
A simple answer to this super simple question would be great! Here is the
I searched google but couldn't find an answer to this rather simple question. I
I searched and searched for an answer for this seemingly simple question in Commerce

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.