开发者

using BC dates in Drupal date field

I am trying to input BC dates in Drupal 6.15 using the Date module. If I enter "old" dates (less than 1000 AD) I get an error. How can I go about this? I cannot revert to开发者_开发百科 text because I need to order things by their date. I need to be able to input really ancient dates like 300 BC. The date is the most important data point in this particular project.

  • Drupal 6.15
  • MySQL database 4.1.25
  • PHP 5.2.6
  • Web server Apache/2.0.54
  • CCK 6.x-2.6
  • Date Module 6.x-2.4: Text Field with Date pop-up calendar
  • Input format 2009/12/22 with years back/forward -2600:+2

Thanks


After a bit of digging in the MySQL docs. I don't believe that it can support dates earlier than 1000AD (see here).

Postgres SQL has better support for dates going from 4713 BC, is switching to that an option for you?

Another option would be to do something clunky like using a number field and customizing the output to get it to look like a date. That way you can still order the field and have a good range. Have a look here to see how to create your own CCK field, it is quite involved.


Take a look at http://drupal.org/project/partial_date for Drupal 7 - handles from 999999999999BC to 999999999999AD

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜