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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:12:22+00:00 2026-05-12T08:12:22+00:00

I need to represent dates earlier than January 1 0001. Do you know a

  • 0

I need to represent dates earlier than January 1 0001. Do you know a library that includes such a type?

It should provide the following functionality:

  • Add/Subtract
  • BigTimeSpan
  • Greater / Less than comparison

It would be ok if values would be less exact the longer the date is ago.

  • 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-12T08:12:22+00:00Added an answer on May 12, 2026 at 8:12 am

    There were 445 days in 45 BC, so you’ll need to add that in, and the switch from Julian (45bc) to the previous roman calendar. The Gregorian calendar change came a lot later (1500s) than you need so you don’t have to worry about that.

    The two main problems of using DateTime are the min and max constants. Obviously being a struct you can’t subclass it either.

    My first option would be to write my BigDateTime or BCDateTime struct, and use a DateTime inside that via composition. You can then set your current Calendar:

    CultureInfo.CurrentCulture.DateTimeFormat.Calendar = new JulianCalendar();
    

    for to the Julian one but as I mentioned that only gives you to 45 years BC

    If the year is below 45 you switch Calendars again to your own subclassed Calendar object. If the year is 45, you’ll need another Calendar with the 445 days for that year (they did this to adjust between the older Calendar).

    What will your min and max constants be for this object? The dawning of civilisation itself?!

    You will need to pick those, and also bare in mind the Julian calendar and its previous non-reformed version were specific for the countries of the Roman empire. Being a westerner I have no idea of the other calendars that existed, you’ll get a lot more information from the wikipedia articles though.

    If you choose to do all cultures then you have a mammoth task on your hands (as the original .NET team did) to implement calendars that already exist. Different calendars have different starting epochs relative to BC, such as the Islamic, Chinese and Hindu calendars. More information on that is here. So if you want every culture and not just the Roman empire you will need to make your own version of the following, or atleast some of them:

    System.Globalization.Calendar
        System.Globalization.EastAsianLunisolarCalendar 
        System.Globalization.GregorianCalendar 
        System.Globalization.HebrewCalendar 
        System.Globalization.HijriCalendar 
        System.Globalization.JapaneseCalendar 
        System.Globalization.JulianCalendar 
        System.Globalization.KoreanCalendar 
        System.Globalization.PersianCalendar 
        System.Globalization.TaiwanCalendar 
        System.Globalization.ThaiBuddhistCalendar 
        System.Globalization.UmAlQuraCalendar
    

    Good luck! It’d be interesting to see how you get on.

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

Sidebar

Related Questions

I need to represent inheritance like Person/Student. How do you do that in LInqToSql?
I need to lock the browser scrollbars when I show a div that represent
i have very simple problem. I need to create model, that represent element of
I have 2 integer fields that represent dates in the YYYYMMDD format. What is
I need to represent single precision numbers as text in a way that won't
I need a way to represent a 2-D array (a dense matrix) of doubles
Need a function that takes a character as a parameter and returns true if
Need to an expression that returns only things with an I followed by either
Need a function like: function isGoogleURL(url) { ... } that returns true iff URL
Let's say I have a date that I can represent in a culture-invariant format

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.