Commit Graph

41 Commits

Author SHA1 Message Date
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
84693147d0 - MFH: Added support for selectively listing timezone identifiers by country
code through timezone_identifiers_list() / DateTimezone::listIdentifiers().
- MFH: Added timezone_location_get() / DateTimezone::getLocation() for
  retrieving location information from timezones.
2008-07-18 14:33:53 +00:00
Derick Rethans
149848846d - MFH: Added DateInterval::createFromDateString() that creates an interval
from the relative parts of a date/time string.
- MFH: Fixed an issue where special relative bits were not applied.
2008-05-02 12:49:16 +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
0e9a12d8b1 - MFH: Allow datetime objects to be serialized and woken up.
- MFH: Implemented __set_state().
2008-03-14 16:19:52 +00:00
Derick Rethans
ffbe501ad2 - MFH: Added date_timestamp_get() / DateTime::getTimestamp() to retrieve the
Unix timestamp belonging to a date object.
2008-01-28 20:30:51 +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
Scott MacVicar
6f04c5169e MFH: Add Datetime::createFromTimestamp to allow setting of a unix timestamp without invoking the date parser. 2007-12-14 14:28:36 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Michael Wallner
5f7750c6e6 MFH:
- OO fixes:
  . no is_ref for objects in PHP5+
  . initialize objects when created with the `new` operator
  . check for proper initialization in child classes
 - fix typo: transistion -> transition
 - add test
2006-08-01 13:28:28 +00:00
Derick Rethans
9ccbb28696 - Enable all new date functions and classes 2006-07-18 12:38: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
Frank M. Kromann
80cc4867e3 Export symbols that will allow building WDDX as shared object 2006-01-28 06:18:01 +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
Ilia Alshanetsky
ea80259eb3 Fixed ZTS build 2005-11-29 23:10:15 +00:00
Ilia Alshanetsky
820b5aa9e4 Fixed bug #35425 (idate() function ignores timezone settings). 2005-11-29 20:19:56 +00:00
Derick Rethans
2bb4d8282c - Fixed bug #35143 (gettimeofday() ignores current time zone).
- Fixed tests due to class constants patch.
2005-11-20 20:14:24 +00:00
Derick Rethans
c3678550a3 - Implemented tzcache
- Attempt at Windows detection code
2005-10-05 08:20:44 +00:00
Derick Rethans
afccca77dd - MFH: Allow an external Timezone Database to be used. 2005-10-03 11:17:28 +00:00
Derick Rethans
abcfcd3f2e - MFH: Added date_time_set, date_date_set and date_isodate_set() functions, and
setTime, setDate and setISODate() methods.
2005-09-02 14:58:01 +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
Antony Dovgal
38e4fb09e0 fix tsrm build 2005-07-08 18:16:46 +00:00
Antony Dovgal
39379b8f58 rename php_format_date() to date_format()
add wrapper for date_format() to use it in other extensions
2005-07-08 12:26:30 +00:00
Derick Rethans
bf23d8d2b8 - Renamed date_timezone_set/get() to date_default_timezone_set/get().
- Added missing proto's and folding marks.
2005-07-04 21:27:26 +00:00
Derick Rethans
531c8b9f8c - PHPAPI + static don't mix, obviously. 2005-07-04 13:21:39 +00:00
foobar
19b6ffed3c - Always use #ifdef when dealing with HAVE_* defines from AC_CHECK_FUNCS()
- Added check for strftime() also in the timelib configure
2005-07-03 23:30:52 +00:00
Derick Rethans
8aa3554d19 - Reimplemented time(), getdate() and localtime() functions with new datetime
library.
2005-07-03 20:45:08 +00:00
Derick Rethans
0ef991e5ae - Fixed bug #33532 (Different output for strftime() and date()).
- Re-implemented checkdate(), strftime() and gmstrftime() with the new timelib
  code.
2005-07-03 19:14:55 +00:00
Derick Rethans
ed02f202f0 - Fixed bug #30096 (gmmktime does not return the corrent time).
- Re-implemented mktime and gmmktime with new date time library.
- Added testcase for bug #30096, updated test cases for E_STRICT warning of
  is_dst parameter usage for mktime/gmmktime.
2005-07-03 14:27:31 +00:00
Derick Rethans
2b47899981 - Overhauled selecting the correct timezone. The timezone set with
"date_timezone_set" override the TZ environment variable, which on its turn
  overrides the date.timezone setting. If none of the three is set, we fallback
  to UTC.
- Added "date_timezone_set" function to set the timezone that the date
  functions will use.
2005-07-02 21:19:25 +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
3cdc895213 - Added backward compability wrapper "php_parse_date()".
- Changed WDDX extension to use new date parsing code.
- Removed all remnants to the old parser.
#- I hope that I didn't break the .dsp's...
2005-06-19 22:15:27 +00:00
Derick Rethans
3e7446f0e7 - Allow default timezone to be set with the .ini setting "date.timezone". 2005-06-18 20:23:19 +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
a87d9876cf nuke unused entries 2005-06-16 22:03:04 +00:00
Derick Rethans
4fb4cac65c - Add my new timelib and ext/date. For now only strtotime() makes use of this. 2005-06-14 21:32:29 +00:00