Date API

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
This group should probably have more organizers. See documentation on this recommendation.

This will be a place to discuss future development of the Date API and related modules, including new features, architectural changes, and ideas for moving some of the Date code into core.

New!! Please see my session from the Midwest Developer Summit to see an overview of the issues and my thoughts about Date handling for core.

D7 -> D8 Roadmap

Date in Eight Issues

Related Core Issues

Summary of Date in Eight Initiative

Read more
ebrittwebb's picture

How do I update DATE & DATE API modules from 7.x-2.10 to 7.x-2.11-beta2?

How do I update the DATE and DATE API modules on my site from 7.x-2.10 to 7.x-2.11-beta2?

I tried to update using the command: composer require 'drupal/date:^2.11'

But I received the errors:
- drupal/date_api 2.10.0 requires drupal/date 2.10.0 -> satisfiable by drupal/date[2.10.0] but these conflict with your requirements or minimum-stability.
- Installation request for drupal/date_api (locked at 2.10.0) -> satisfiable by drupal/date_api[2.10.0].

Read more
JordanBeckett's picture

Methods for displaying Repeat Date?

http://wowdev.immot.us/classes-and-workshops

I'm working with Date API, Date Repeat API, and Views in this Drupal 7 site. I have classes (part of the Events calendar) with repeating dates. In other words, so classes happen once, other happen every Wednesday at 3pm, etc.

Using Views, I display all the events, from the upcoming first, to the furthest out. The classes which only occur once display their event time; however, the classes which have repeating dates, display the start date, instead of the date of the NEXT instance.

Read more
luco's picture

Date Views development guide?

hey there,

I'm studying Views in order to build a module that will use date parts as contextual filters.

with that in mind, I need to know how can I pull a list of date fields (both core and custom date fields) that I can manipulate in simple ways (at first YYYY, MM, DD, but later on maybe weeks within a month or suggestions from users).

is there any tutorial on that? paid solutions (video courses, books etc.) also welcome.

thanks in advance,
Luciano

Read more
Aleet's picture

My struggle with historical dates in multiple calendars

Hello, I am having so many issues related to date that I thought perhaps just explaining what I'm trying to do might motivate someone to give me advice.

I am building a non-profit site about historical figures who lived between 1st and 8th centuries. Birth dates and death dates have to be entered for each figure in gregorian, persian and islamic calendars.

After spending a lot of time on messing around with the date module, I was told that the module would not be helpful because timestamp goes back to only 1900.

Read more
KarenS's picture

HTML5 Date field

We want to use HTML5 date fields where we can, but there are going to be a lot of issues.

There are a whole list of possible fields to use: date, datetime, datetime_local, week, month, etc. (see http://www.w3.org/TR/html5/states-of-the-type-attribute.html#date-and-ti...)

If you go to http://html5test.com/ and test various browser support, you can see that none of the HTML5 date fields work reliably across desktop browsers. In fact I only found one desktop browser that supported any HTML5 date field -- Chrome supports the 'date' type but nothing else.

Read more
sirkitree's picture

Drupal Ladder

Hi!

I'm at a local Drupal ladder meetup and I was looking through the core initiatives listed on the lesson for Find a core system that interests you and learn about it and I was surprised to notice that Date in Eight is not on the list!

What's the dealio?

Is this something you want in a place like this to try and get more people to help, to see if more people are interested? Seems that this initiative could use more publicity and the Drupal ladder could be a perfect place to do so, no?

Read more
cosmicdreams's picture

Deep dive analysis of how dates are handled by other systems

After talking with Karen at the Midwest Developer Conference I am very excited to help out working on bringing the date module functionality into Drupal 8. There is a lot of work to do in order for that to happen. We need to:

  • Separate the code that can become a Component from the code that needs to be Drupal specific
  • Separate the code that needs to be a library (PSR-0) and the stuff that needs to be in the module directory
  • Separate the code that should be put into core from the core that will live on as a community-driven module.
Read more
KarenS's picture

Date in Eight BOF at DrupalCon Munich

Start: 
2012-07-25 13:00 - 14:00 Europe/Berlin
Event type: 
User group meeting

I'm holding a Date in Eight BOF at DrupalCon Munich on Tuesday August 25 from 1-2PM in the St. Moritz room. Please join us if you can!

http://munich2012.drupal.org/content/date-eight

Read more
KarenS's picture

Date in Eight Sprints

We're hoping to do some sprints around a potential effort to get parts of Date in core at the DrupalCamp New York July 19-23 (http://www.nyccamp.org/) and Midwest Developer Summit, July 26-28 (http://midwest-developer-summit.com/).

The sprints will involve discussions about which parts should go into core and a strategy for getting them there.

Please join us if you can!!

Read more
wipeout_dude's picture

Streamline single day date entries??

Hi,

Does anyone have a solution for streamlining the date module UI for single day date/time entries?

In simple terms I have a need for single day date fields with a start time and end time (end date is always the same as the start date).. End users will be creating these and there will NEVER be a need for milti-day events.. So I would really like to steam line the UI so that the user never has to enter the "To" date.. Having the to date means they have to enter the date twice which means more confusion and a greater chance of them messing it up..

Read more
KarenS's picture

Performance Tests for Storage Alternatives

There is lots of concern about the performance of dates. There are actually two parts to this:

  • the time it takes to retrieve date values stored in one method or another, a database issue.
  • how much time it takes to massage the raw data into the desired format for display, a PHP issue.

The second one is the real bottleneck when working with dates, and is unrelated to the storage method being used. This page is to discuss the first topic, the part of the performance that is related to the storage method that is used.

Read more
arlinsandbulte's picture

ISO Date Format

I know this is going to be a controversial topic. So I am going to head off the battle and start the discussion myself right away.
KarenS has proposed adopting the ISO format as the only supported format for future versions of the Date module (7.x-3.x contrib & 8.x core!). I am 100% in favor of this proposal.

Read more
KarenS's picture

New Date Functions in PHP 5.3

New Date functions/classes in PHP 5.3

DateTime::createFromFormat
date_create_from_format

DateTime::add
date_add

DateTime::sub
date_sub

DateTime::diff
date_diff

DateTime::getLastErrors
date_get_last_errors

DateTime::getTimestamp
date_timestamp_get

DateTime::setTimestamp
date_timestamp_set

The DateInterval class
DateInterval::__construct

DateInterval::createFromDateString
date_interval_create_from_date_string

DateInterval::format
date_interval_format

The DatePeriod class
DatePeriod::__construct

Read more
Subscribe with RSS Syndicate content

Date API

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week