Commit Graph

116 Commits

Author SHA1 Message Date
Hannes Magnusson
10da251565 Fixed bug#51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error) 2011-06-05 13:30:01 +00:00
Nuno Lopes
9aec0c6806 fix last commit:
- fix code coverage build
 - spread static love
2011-03-28 09:10:23 +00:00
Adam Harvey
68811c473d Fix bug #54316 (DateTime::createFromFormat does not handle trailing '|'
correctly).
2011-03-21 09:40:52 +00:00
Derick Rethans
28b41c811d - MFH: Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat().
- Regenerated the parsers for HEAD and PHP_5_3.
2010-11-13 15:01:48 +00:00
Derick Rethans
bb8ec8d629 - Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick) 2010-08-30 16:40:29 +00:00
Kalle Sommer Nielsen
e71ee33358 Fixed bug #51943 (Several files are out of ANSI spec)
# Based on patch by CoreyStup at gmail dot com
2010-07-13 23:59:54 +00:00
Adam Harvey
53cfb3d53d Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains timezone). 2010-03-26 04:31:26 +00:00
Derick Rethans
3025ca8e17 - Fixed bug #46111 (Some timezone identifiers can not be parsed). 2010-03-07 19:18:06 +00:00
Derick Rethans
2d2e02740a - Fixed bug #50392 (date_create_from_format enforces 6 digits for 'u' format
character).
2010-03-07 13:08:47 +00:00
Derick Rethans
13e0d47cf3 - Fixed bug #51096 ('last day' and 'first day' are handled incorrectly when
parsing date strings).
- For 5.2 I just added the test case minus new 5.3 additions.
2010-03-06 16:04:47 +00:00
Derick Rethans
8ac4d1190a - Added a test case for bug #45866
- Fixed tests: oo_002, bug46268
- Fixed bug #50930 (Wrong date by php_date.c patch with ancient gcc/glibc
  versions).
- Make sure faulty strings passed to DateTime::modify() notify the user.
- Revert fix for bug #50392 as it was fixed wrongly without a proper test case.
- Fixed a bug with the 'r' formatting function as the default buffer size that
  was allocated only fit 4 digit years.
2010-02-10 16:23:30 +00:00
Ilia Alshanetsky
1ee6c8277f Fixed bug #50680 (strtotime() does not support eighth ordinal number). 2010-01-07 12:54:44 +00:00
Ilia Alshanetsky
d0f6848e66 Fixed bu #50392 (date_create_from_format() enforces 6 digits for 'u' format character) 2009-12-15 12:34:12 +00:00
Derick Rethans
24b973cafc - Fixed bug #45554 (Inconsistent behavior of the u format char). 2009-07-29 15:34:59 +00:00
Derick Rethans
aea378c91c - MFH: Fixed bug #46889: Memory leak in strtotime(). 2008-12-18 14:55:36 +00:00
Derick Rethans
f2720ecc34 - MFH: Export DateTime and DateTimeZone class entries so that external
extensions can make use of it as well.
2008-11-06 09:45:58 +00:00
Derick Rethans
1c08ae1c8e - MFH: Fixed an issue with the * format specifier for parsing from a
user-defined format.
2008-11-05 10:42:42 +00:00
Derick Rethans
e3cd394979 - MFH: Support for "back of <hour>" and "front of <hour>" phrases that are used
in Scotland.
2008-08-29 12:01:57 +00:00
Derick Rethans
b5e2564abf - MFH: Fixed a bug with the YYYY-MM format not resetting the day correctly.
- MFH: Fixed a bug in the DateTime->modify() methods, it would not use the
  advanced relative time strings.
- MFH: Fixed return values of all the modifying methods, they now properly
  return the object itself.
2008-07-30 18:00:44 +00:00
Derick Rethans
07c9bd8382 - MFH: Fixed an issue with "first <weekday> of" in case the first <weekday> was
the same day-of-week as the first day of the month.
2008-07-23 19:53:39 +00:00
Derick Rethans
11f9cd84f7 - MFH: Fixed bug #43452 (strings containing a weekday, or a number plus weekday
behaved incorrect of the current day-of-week was the same as the one in the
  phrase).
2008-07-23 18:50:37 +00:00
Derick Rethans
0ab7520dc0 - MFH: Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
different).
2008-07-16 15:41:01 +00:00
Derick Rethans
3df7836db9 - MFH: Also add the warnings for times. This does not make sense for the
english text parser, as invalid times are never allowed in there.
2008-07-15 17:38:27 +00:00
Derick Rethans
c76ba173a9 - MFH: Added a warning to the error struct in case a parsed-date was found to
be invalid.
2008-07-14 17:36:12 +00:00
Derick Rethans
5ab9ca968b - MFH: Fixed a compiler warning - the code didn't make much sense. 2008-07-11 08:42:54 +00:00
Derick Rethans
db2ed70a73 - MFH: Fixed bug #45459 (date_create_from_format() fails on DATE_RFC3339) by
allowing a few more format specifiers in date_create_from_format() /
  date_parse_from_format().
2008-07-08 20:25:28 +00:00
Derick Rethans
4a23bbfe75 - MFH: Fixed some ambiguities in the date parser. 2008-07-08 18:28:49 +00:00
Derick Rethans
484d6b21c0 - Replaced // by /* .. */ comments. 2008-07-08 17:55:59 +00:00
Derick Rethans
f533671711 - MFH: Added support for "<xth> <weekday of" and "last <weekday> of" phrases to
be used with months - like in "last saturday of februari 2008".
2008-05-04 20:52:56 +00:00
Derick Rethans
97b37f253c - MFH: Rearranged some structures to allow for more powerfull period/intervals. 2008-05-01 16:15:45 +00:00
Derick Rethans
357292a098 - MFH: Fixed "this week", "previous week"/"last week" and "next week" phrases
by actually meaning the week.
#- MFH: For now the week starts on Monday, but I plan on making that
#  configurable.
2008-04-27 19:14:33 +00:00
Derick Rethans
2047fa858c - Added new date/time functionality:
. support for diffing date/times through date_diff() / DateTime::diff().
  . added DateInterval class to represent the difference between two date/times.
  . support for parsing ISO intervals for use with DateInterval.
  . date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an
    interval to an existing date/time.
- MFH: Fixed bug #44742 (timezone_offset_get() causes segmentation faults).
2008-04-25 12:35:58 +00:00
Ilia Alshanetsky
97e293ed4b Removed unused variable 2008-03-23 15:48:10 +00:00
Derick Rethans
a27d6afd83 - Added support for parsing date/time strings returned by MS SQL with strtotime(). 2008-03-13 15:54:25 +00:00
Derick Rethans
b8883b65b8 - MFH: Added a few new separation specifiers.
- MFH: Added specifiers that can reset or default the y/m/d/h/i/s/tz values.
- MFH: Fixed a problem with parsing timezones as part of a format.
2008-02-25 18:26:33 +00:00
Derick Rethans
22392affef - MFH: fixed typoes. 2008-02-17 18:17:45 +00:00
Derick Rethans
a61e5f897c - MFH: Support "first/last day of <month>" style texts. 2008-02-03 14:15:07 +00:00
Derick Rethans
99c56139c7 - That should have been ||. 2008-01-29 20:14:18 +00:00
Derick Rethans
6878464e06 - MFH: Fixed bug #43960 (strtotime() returns timestamp in the future when given
a bogus string).
2008-01-29 20:10:24 +00:00
Derick Rethans
4b7f5f9630 - MFH: Fixed parsing of timezones 2008-01-27 22:16:48 +00:00
Derick Rethans
3d0797da2b - MFH: Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00). 2008-01-17 20:45:08 +00:00
Derick Rethans
e549873c10 - MFH: Added support for abbreviation and offset based timezone specifiers for
DateTime::getOffset() and DateTime::getName().
- MFH: Fixed bug #43527 (DateTime created from a timestamp reports environment
  timezone).
- MFH: Fixed bug #42190 (Constructing DateTime with TimeZone Indicator
  invalidates DateTimeZone).
2008-01-17 18:49:45 +00:00
Derick Rethans
9f979a16bf - Added new date/time functionality:
* date_parse_from_format(): Parse date/time strings according to a format.
  * date_create_from_format()/DateTime::createFromFormat(): Create a date/time
    object by parsing a date/time string according to a given format.
  * date_get_last_errors()/DateTime::getLastErrors(): Return a list of warnings
    and errors that were found while parsing a date/time string through:
    - strtotime() / new DateTime
    - date_create_from_format() / DateTime::createFromFormat()
    - date_parse_from_format()
# [DOC]
2008-01-13 15:16:02 +00:00
Derick Rethans
af88e0b52c - MFH: Commit generated file. 2007-07-12 18:59:55 +00:00
Derick Rethans
d62dca3d48 - Fixed bug #40290 (strtotime() returns unexpected result with particular
timezone offset).
2007-04-13 08:11:07 +00:00
Derick Rethans
b15cbf69c6 - MFH: Fixed bug #40861 (strtotime() doesn't handle double negative relative
time units correctly).
2007-04-11 14:37:42 +00:00
Derick Rethans
b7a791827c - Revert this patch, as the code was incorrect.
- It was also not committed to HEAD.
2007-03-21 09:40:33 +00:00
Ilia Alshanetsky
5abffb51b6 Fixed bug #40861 (Multiple +/- on relative units breaks strtotime()). 2007-03-21 00:25:55 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
f5b6604376 Fixed bug #39791 (Crash in strtotime() on overly long relative date
multipliers).
2006-12-11 05:04:36 +00:00