Closed (duplicate)
Project:
Date
Version:
6.x-2.6
Component:
Date CCK Field
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2010 at 12:26 UTC
Updated:
23 Sep 2010 at 12:37 UTC
On cck field settings I have fill default values "Custom value for From date" and "Custom value for To date" with data:
Custom value for From date: first day of previous month 00:00:00
Custom value for To date: last day of previous month 23:59:59
And when I try to save, it didn't save with errors:
But in PHP with strtotime function all works normally:
$date_start=strtotime('first day of previous month 00:00:00');
$date_end=strtotime('last day of previous month 23:59:59');
echo date('r',$date_start)."\n".date('r',$date_end)."\n";
outputs:
Sun, 01 Aug 2010 00:00:00 +0400
Tue, 31 Aug 2010 23:59:59 +0400
Why date module didn't accepts this strings?
Comments
Comment #1
arlinsandbulte commentedThis is by design in the current version of date, but there is another feature request to implement this:
#319195: Set default value to a custom strtotime string (for relative or exact dates)