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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:40:58+00:00 2026-06-05T08:40:58+00:00

I just wonder, why some enums are missing on the TimeUnit class of Java?

  • 0

I just wonder, why some enums are missing on the TimeUnit class of Java?

Actually the max timeunit is DAY while i would like to use stuff like WEEK, YEAR…

  • 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-05T08:41:00+00:00Added an answer on June 5, 2026 at 8:41 am

    The TimeUnit.DAYS constant represents an interval of 24 hours, not a calendar day (midnight to midnight). Anything beyond a day (a week, a month, a year) is a calendar unit, not a time unit. The duration of calendar units depends on the calendar in use: for example, a week can be longer or shorter by an hour on weeks when daylight savings time goes in and out of effect, leap years are longer by a day, and so on. That is why including calendar units into TimeUnit enumeration would not make sense.

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

Sidebar

Related Questions

I have just started to use Eclipse for my Java programmaing. I just wonder
I just wonder to know if is better to use PDO class rowCount method
Just wonder how much cost to raise a java exception (or to call native
I just wonder if it is possible to only use CSS but not javascript
I just wonder if there are any JDBC implementations (in some extent, as much
I just wonder if there is some convenient way to detect if overflow happens
Just now,I saw some code like this: if(condition){ var xx='sss'; } //do something if(condition){
Just some architectural question: I use ASP.net MVC and exclusively rely on Strongly-Typed Views
I would like to store some Application-Related Metadata for Files, and NTFS Alternate Data
Just wonder what the difference is. I need some concise explanation.The wikipedia is 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.