Currently, geertvd and I are porting the calendar module which relies quite a bit on date, date_api and date_views. Several of our issues are blocked on the non-existence of a working port of the date module. I looked around in the issue queue, but couldn't find the current status of the port. Looking at the repo it seems like it has been sitting idle for a while, but I'm unsure whether or not there is a plan and/or an effort ongoing to port the module.

Specifically for the calendar module, the things that come to mind are:
- support for end date functionality
- date views "find all date fields" functionality
- date views argument handlers
- granularity helper functions
- creation of a week days header
- support to find the week of the year number
- date api find the difference between two dates
- ...

We managed to work around several of these issues in a CalendarHelper class, but that's not really the place where these functions should live. Further more, some of these functions are not fully ported or use hardcoded values in places they shouldn't.

If someone would be porting the things that haven't made it into core, we'd be definitely willing to help out by posting patches.

Comments

Anonymous’s picture

pjonckiere created an issue. See original summary.

tedbow’s picture

Title: Drupal 8 port for the date module » Drupal 8 port for the Date module functionality missing from 8.x core

Just updating the title to reflect that this is really about the functionality of the Date module that did not get into core for 8.0.x

mpdonadio’s picture

I am unaware of anyone else working on porting missing Date functionality. I think what also needs to be decided is what should end up in core, what should be part of the core DateTime module, and what should end up in contrib.

Proposed direction for DateTime (and some core date handling since the distinction is a bit fuzzy b/c there are Timestamps, the component date class, the core date class, and the DateTime module) is being tracked in #2543958: [META] DateTime Module Improvements.

Personally, I think that a lot of the generic functionality for working with dates should end up in the core DateTime module itself (or in the core class), but things like end dates, repeating dates, should be in contrib. I think it is a little silly to provide the DateTime field, but provide little support for actually working with data in an abstract way. I would be happy to help with the process and/or champion it for inclusion in a future release (none of this should be BC break, so could probably get in at any time).

webflo’s picture

Shameless plug, i wrote a small datetimepicker module which integrates xdan/datetimepicker with Drupal Core and the datetime field. This could be the successor of data_popup?

johnv’s picture

I am a maintainer of the Offie Hours module. It relies on Date API.
At the moment, the D8-version of office_hours contains a copy&port version of the date_api.module file.
You can contact me if you need help to port Date API or other parts.

ATM i do not know which functionality of Date module is in Date D8-core. I guess we need a battle plan.

[EDIT] Oh, i see i already created an issue a year ago: #2369791: What happened with date_api.module? In \Drupal\Core\Datetime\DateHelper !

mpdonadio’s picture

#5, the plan for core is being worked out at #2543958: [META] DateTime Module Improvements.

johnv’s picture

Update on #5: all functions from date_api.moduile are now in class \Drupal\Core\Datetime\DateHelper. Didn't know that before.

douggreen’s picture

I have a need for a repeating date and a calandar for a D8 project. I'm researching what's been done and looking for direction,

mpdonadio’s picture

Would it make more sense to approach this from the "what Date module features really need to be in core" angle, and either track in #2543958: [META] DateTime Module Improvements, or make a new META for datetime.module just for this?

Anonymous’s picture

Yes, that sounds like a good approach to get this going again. I don't think a second (and quite overlapping) META is worth it just to make it easier to differentiate between what's coming from the date module in D7 and what's new. It probably will only confuse people.

No Sssweat’s picture

I hope changing the date format for the form display (when editing node) is the in the works. Currently in Drupal 8.0.1, you can only change it for manage display only (when node is viewed).

I don't like how I have to select my date in the form display (when editing node) and not able to just type it in like in Drupal 7.

Update: I have placed a request over here https://www.drupal.org/node/2646454 Just letting you know incase anyone is interested in following it.

mpdonadio’s picture

#11, you can put in a feature request against 8.1.x for that.

johnv’s picture

Title: Drupal 8 port for the Date module functionality missing from 8.x core » Port Date module functionality missing from 8.x core
Category: Feature request » Plan
Parent issue: » #2543958: [META] DateTime Module Improvements

Just another shorter title.

SKAUGHT’s picture

linking to related issues..
edit: sorry, related issue seems to have failed. https://www.drupal.org/node/2161337

SKAUGHT’s picture

dawehner’s picture

I'm wondering whether the plan is really to put every feature of date module into core? Stuff like repeating time is reasonable complex but still kinda edge casy, so I'm curious whether this is the plan.

AlexBorsody’s picture

I think it's pretty standard functionality, for example Google calendar or most modern date functions, when setting a date has "set to repeat" as an option.

charos’s picture

Now that the D8 is released , what is the future of Date's as a contrib module? The core datetime.module does not support start/end dates for example, is there a plan to have glue modules on core functionality expansion?

colan’s picture

Generally, we need to wait and see what lands in #2543958: [META] DateTime Module Improvements. Specifically, end dates are being working on in one of the sub issues #2161337: Add a Date Range field type with support for end date, which will definitely be in core.

webel’s picture

charos’s picture

D8.1 landed. Now we wait for 8.2 ?

SKAUGHT’s picture

yep.. it's how the system works.

DamienMcKenna’s picture

With Date in core and efforts ongoing to improve it (#2543958: [META] DateTime Module Improvements) I'm not sure what the benefit would be to continue this here?

DamienMcKenna’s picture

Furthermore, the 8.x-1.x branch is so out of date it still uses PSR-0 paths, doesn't have a .info.yml file, and is just woefully out of date. I really don't see the point in splitting our limited time with this redundant effort.

jhedstrom’s picture

Status: Active » Closed (outdated)

Closing for the reasons @DamienMcKenna mentioned in #23 and #24.

DamienMcKenna’s picture

Assigned: Unassigned » vijaycs85

This ok with you vijaycs85?

vijaycs85’s picture

Assigned: vijaycs85 » Unassigned

@DamienMcKenna I think we are OK to close considering we haven't worked on it for a while. AFAIK this is the state in D8:
date api - Helper functions.
date_context - outdated?
date_migrate - outdated?
date_popup - moved to https://www.drupal.org/project/date_popup
date_repeat & date_repeat_field - datetime_range in core
date_tools - Close to date_migrate and it was experimental in D7 anyway.
date_views - outdated/part of datetime
date - part of datetime in core.


Update: probably we should confirm these details and add to project page for future reference.