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

  • Home
  • SEARCH
  • 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 6042421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:47:18+00:00 2026-05-23T06:47:18+00:00

I came across the XMLGregorianCalendar class a while ago and I was impressed by

  • 0

I came across the XMLGregorianCalendar class a while ago and I was impressed by the way it made GregorianCalendar look lightweight. 😉

Recently, I noticed a method BitInteger getEon() which baffles me.

From the Javadoc for XMLGregorianCalendar

getYear() is a value between -(10^9-1) to (10^9)-1 or DatatypeConstants.FIELD_UNDEFINED.
getEon() is high order year value in billion of years.

It occurs to me that as the length of day on Earth changes significantly over the millions of year and there for the number of days in a year has changed. The Gregorian calendar wouldn’t make sense a billion years ago or a billion years hence. So getEon() can only be sensibly set to 0 or left undefined which has much the same outcome.

My question: Am I missing something? Is there a sensible use for the getEon() method?

  • 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-23T06:47:19+00:00Added an answer on May 23, 2026 at 6:47 am

    Well, according to http://www.merlyn.demon.co.uk/critdate.htm the unix time using 64 bits integer will end around the year 3E11. Given that Java uses milliseconds instead of seconds, Java time (64 bits) will end around 3E8. So this provides some expansion beyond the limits of the JVM.

    In a more practical note, when you use this scale of time you are talking about geological, evolutionary or cosmological events, so the rest of the data in a date (year, month, day…) is meaningless. It is better if you use a long with the year (or even an int with the eon) and forget about the rest of it.

    It looks like somebody was really, really bored (and boring).


    Edit: Of course, there is always some crazy problems that can use it, but not real world problems (as in: “if we have a Hanoi Towers with 64 discs and move a disc a second, when would we finish swapping the towers”).

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

Sidebar

Related Questions

I came across this class while reading a C# book and have some questions.
I came across the class XMLGregorianCalendar today. I searched in Google regarding its usage
I came across this program and its not behaving in expected way. public class
I came across the WebView class in android.webkit and was impressed by how it
I came across this recently, up until now I have been happily overriding the
Came across a line in OpenSSL that made me do a double take... if
Came across something strange while migrating to my new server. I have a script
Came across this curiosity recently. One solution, with two projects within it (ORM and
Came across this one while browsing the response to another question on SO (
I came across a question recently that was for Generating primary key in a

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.