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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:21:26+00:00 2026-06-02T10:21:26+00:00

I try to compare some date with jodaTime, i use week and year to

  • 0

I try to compare some date with jodaTime, i use week and year to compare date

DateMidnight endDate01 = new DateMidnight().withYear(2012).withWeekyear(37);
DateMidnight endDate02 = new DateMidnight().withYear(2012).withWeekyear(38);


endDate01.isBefore(endDate02); //return false

I don’t understand why endDate01 seem greater the endDate02.

Maybe a bug?

DateMidnight endDate01 = new DateMidnight();

endDate01.withYearOfEra(o1.getEndYearPeriod());
endDate01.withWeekOfWeekyear(o1.getEndWeekPeriod());

System.out.println(o1.getEndWeekPeriod() + " " + o1.getEndYearPeriod());
System.out.println(endDate01.getWeekOfWeekyear() + " " + endDate01.getYearOfEra());

i get

37 2012

16 2012

should get the same result, no?

  • 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-02T10:21:27+00:00Added an answer on June 2, 2026 at 10:21 am

    those both code work fine

    DateTime dt = new DateTime(); 
    dt = dt.withWeekOfWeekyear(29); 
    dt = dt.withWeekyear(2011);
    
    DateMidnight dt2 = new DateMidnight().withWeekOfWeekyear(29).withYear(2011);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to get some website attribute (colour of the cell) and compare in
I'm trying to optimize some code, using criterion to try to compare, for example,
I try to compare Mnesia with more traditional databases. As I understand it tables
i try to compare two lists with each other: ListA (a1,a2,a3,...) ListB (b1,b2,b3,...) I
I have used a stacked bar chart (with coord_flip) to try to compare distributions
For example, I try to do something like this: - (BOOL)compare:(NSDecimal)leftOperand greaterThan:(NSDecimal)rightOperand { BOOL
I'm trying to compare two date strings for equality by wrapping them with the
My web-app has this secret place only some people are allowed to use. When
Trying to compare some dates in java but can't get the formatting right, where
I am having to try to determine whether a date from a hidden field,

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.