Reviewed & tested by the community
Project:
Date
Version:
7.x-2.x-dev
Component:
Date API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2012 at 16:21 UTC
Updated:
25 Mar 2023 at 11:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dmitriy.trt commentedFix and a test.
Comment #2
barami commentedI have same problem.
It needs to be accept.
Accepet above patch or change code using in_array function to add parameter 'strict' to TRUE.
http://php.net/manual/en/function.in-array.php
default 'strict' parameter is FALSE and it searchs on array keys too.
So, limitGranularity functions always don't remove granularity part.
Comment #3
barami commentedComment #4
barami commentedMerge test case with patch in #2.
Comment #5
barami commentedChange tab to spaces.
Comment #7
rosk0Properly formatted version of the #4 patch with test separated.
Comment #9
chris matthews commentedThe year old patch in #7 to date_api.module does not apply to the latest 7.x-2.x-dev and will need a reroll.
Comment #10
spiritcapsule commentedreroll of #7
Comment #11
rohan-sinha commentedreviewed patch on #10 , DateObject::limitGranularity() issue is resolved.
Comment #14
kunal_sahu commentedHi @all,
I have tested this patch . The patch LGTM.
And this does solves the issue.
RTBC++.
Provided an MR for helping the maintainer.
Please merge.
Thanks