Commit Graph

36 Commits

Author SHA1 Message Date
Derick Rethans
ab6789a0ef - Fixed bug #52668 (Iterating over a dateperiod twice is broken). 2010-08-30 15:32:09 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Derick Rethans
aea378c91c - MFH: Fixed bug #46889: Memory leak in strtotime(). 2008-12-18 14:55:36 +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
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
8c5274f479 - MFH: Added the DatePeriod class/iterator that iterates over a date time
object for a specific number of iterators and applies a DateInterval each
  time.
@DOC: More will follow though
2008-05-01 00:12:24 +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
Derick Rethans
7c46f35da3 - MFH: Fixed bug #44209: strtotime doesn't support 64 bit timestamps. 2008-02-22 09:47:19 +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
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
bffb8c406c MFH: fix warnings 2007-07-20 23:53:40 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Derick Rethans
74dfa9f0ba MFH:
- Implemented Dmitry's const patch.
- Added support for "weekday" as relative item.
- Fixed bug #37368 (Incorrect timestamp returned for strtotime()).
2006-05-14 17:36:05 +00:00
Derick Rethans
4043f77e36 - MFH: Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers). (Derick)
- MFH: Fixed bug #36988 (mktime freezes on long numbers). (Derick)
- MFH: Implemented better error and warning handling that is also used for the
  date_parse() function.
- MFH: Fixed problems with "T" in front of a time string was seen as a time
  zone string.
- MFH: Fixed a problem were 5 and 6 character timezone abbreviations where not
  correctly parsed.

Experimental support (All MFH):
- Added the date_parse() function that returns a parsed date/time string
  including warnings and errors.
- Added the timezone_name_from_abbr() function that exposes the guessing
  mechanism that tries to find a timezone identifier from a timezone
  abbreviation and GMT offset.
2006-04-11 18:03:52 +00:00
Derick Rethans
88268c6bcc - MFH: Fixed bug #35887 (wddx_deserialize not parsing dateTime fields properly).
- MFH: Fixed bug #35885 (strtotime("NOW") no longer works).
- MFH: Fixed bug #33789 (Many Problems with SunFuncs).
- MFH: Fixed bug #33671 (sun_rise and sun_set don't return a GMT timestamp if one
  passes an offset).
- MFH: Fixed bug #32820 (date_sunrise and date_sunset don't handle GMT offset
  well).
- MFH: Fixed bug #30937 (date_sunrise() & date_sunset() don't handle endless
  day/night at high latitudes).
2006-01-04 21:31:35 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Derick Rethans
f0a0f89a2c - MFH: Fixed bug #35660 (AIX TZ variable format not understood, yields UTC
timezone).
2005-12-20 19:54:10 +00:00
Derick Rethans
7b581f6d19 - MFH: Merged new timelib, which is a bit more cleverer
- MFH: Support "UTC" in strtotime() properly.
- MFH: Added astro code, which is going to form the base for the new sunfuncs.
2005-12-19 13:00:37 +00:00
foobar
f94b3012bd MFH 2005-12-12 19:45:01 +00:00
Ilia Alshanetsky
f4248e51a4 Fixed bug #35499 (strtotime() does not handle whitespace around the date
string).
2005-12-01 16:24:52 +00:00
Derick Rethans
afccca77dd - MFH: Allow an external Timezone Database to be used. 2005-10-03 11:17:28 +00:00
Derick Rethans
08b5c498ce - Implemented better timezone guessing algorithm. 2005-10-01 15:04:07 +00:00
Derick Rethans
321732227f - Fixed bug #34304 (date() doesn't have a modifier for ISO Week Day). 2005-09-02 09:33:08 +00:00
Derick Rethans
d3326d5b26 - MFH: Fixed bug #34087 for real.
- MFH: Windows compile fixes.
2005-08-25 09:47:28 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Derick Rethans
e6c1ff254d - Fixed bug #33578 (strtotime() problem with "Oct17" format).
- Fixed problems with lone years in strtotime().
- Added functions to timelib to get a list of all abbreviations and timezone
  identifiers.
- Fixed problems with parsed dates that only have GMT offsets associated
  with them.
- Fixed a Windows compile problem.
- Added special constants for different often used date formats (DATE_ISO8601,
  DATE_RFC822, DATE_RSS etc).
- Fixed date_default_timezone_get() to return the guessed timezone if none
  was set yet with date_default_timezone_set().
- Added experimental support for Date/Timezone objects as per specifications.
2005-07-20 08:31:02 +00:00
Derick Rethans
422f14cb0f - Fixed bug #33536 (strtotime defaults to now even on non time string). 2005-07-03 21:38:54 +00:00
Derick Rethans
2e9d063814 - Added fallback to system's timezone setting, but marked with an E_STRICT
error.
- Adjusted tests to use the date_timezone_set() function.
2005-07-03 15:01:29 +00:00
Frank M. Kromann
4ae7321f3e Fix Win32 build 2005-06-30 23:03:36 +00:00
Derick Rethans
e155585e6e - Reimplemented date and gmdate with new timelib code.
- Removed old date/gmdate implementations.
- Moved date() related testcases to ext/date/tests.
- Implemented bug #33452.
- Fixed testcase for bug #27719 - there is no timezone called "EST5DST".
2005-06-30 21:38:06 +00:00
Derick Rethans
c41145799d - The incoming TS is GMT... but the hole filler wants local time so we
have to convert it.
- Change e-mail address
2005-06-17 14:54:00 +00:00
foobar
a736f99e2f - Improve portability.
# TODO: The standalone lib needs it's own build stuff, pretty much same as
#       Zend has for standalone builds.
2005-06-16 23:12:10 +00:00
Derick Rethans
ca16776087 - Fixed headers for FreeBSD
- Moved from ntohl to own macro
- Export timelib_dump_tzinfo
2005-06-16 18:34:42 +00:00
Derick Rethans
4ad939be1b - Rename "datetime.c" and "datetime.h" to "timelib.c" and "timelib.h" to
prevent duplicate header names.
2005-06-16 17:12:41 +00:00