Граф коммитов

269 Коммитов

Автор SHA1 Сообщение Дата
tadf 8df20d6b16 * ext/date/date_core.c: edited doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 14:24:29 +00:00
tadf aab8224360 * ext/date/date_core.c: replaced doc for strftime based on Time's one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 13:32:43 +00:00
tadf 87eeed5103 * ext/date/date_core.c (datetime_s_{iso8601,rfc3339,xmlschema,rfc2822,httpdate}):
do not take argument comp.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 13:10:04 +00:00
tadf 4a400e5372 * ext/date/date_core.c: added examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 12:59:21 +00:00
tadf a6567f2b99 * ext/date/date_core.c (Date::(ABBR_)?(MONTH|DAY)NAMES): should be usascii.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 10:36:19 +00:00
tadf 4dbc9af8af * ext/date/date_core.c: rewrote doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 10:25:25 +00:00
nobu b59179c873 * ext/date/date_core.c (date_s_today, datetime_s_now): check the
result of localtime_r().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-07 05:00:04 +00:00
tadf 8676852786 * ext/date/date_core.c: added notes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 12:38:15 +00:00
tadf 2cdd0a87ef * ext/date/date_core.c: flattened format to strftimev.
* ext/date/date_core.c (date_strftime_internal): taints run.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 12:05:12 +00:00
usa 3c9e6c7abb * ext/date/date_core.c (valid_jd_sub): need to convert from VALUE to
double.

* ext/date/date_core.c (offset_to_sec): get rid of a compiler warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 05:12:17 +00:00
tadf 64097bd733 * ext/date/date_core.c (m_real_cwyear): new. derived from m_cwyear.
* ext/date/date_strftime.c: trivial changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-05 08:53:56 +00:00
tadf a975bf245f * ext/date/date_tmx.h: now does not place decoded data. allows to
access indirectly via functions on demand.
	* ext/date/date_strftime.c: ditto.
	* ext/date/date_core.c: ditto.
	* ext/date/date_core.c ({d|dt}_lite_to_s): use strftime.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-05 01:13:19 +00:00
tadf 6dc8503fa5 * ext/date/date_core.c (d_lite_inspect): changed the format.
* ext/date/date_core.c: refactoring and fixing some bugs.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-04 08:02:37 +00:00
usa 7bc3e95205 * ext/date/date_core.c (d_lite_plus): get rid of compiler warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 11:59:30 +00:00
tadf 6a158e05c8 * ext/date/date_core.c (offset_to_sec): fixed invalid validation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 14:53:52 +00:00
tadf 899d2c14b0 * ext/date/date_core.c: use simple/complex mode instead of light/right mode.
* test/date/*.rb: followed the above changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 13:28:48 +00:00
tadf be14985b0c * ext/date/date_core.c: modified documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21 16:36:40 +00:00
tadf 1f35d2485c * ext/date/date_strftime(date_strftime_with_tmx): "%v" means "%e-%b-%Y".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21 13:47:18 +00:00
tadf 559c025a22 * ext/date/date_{core,parse}.c: moved nearly all core code from ext/date/lib.
* ext/date/lib/{date,date/format}.rb: removed nearly all code.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21 12:25:03 +00:00
drbrain f8488a270f * ext/date/lib/date/format.rb: Document date formats. Patch by
Clinton Nixon.  [Ruby 1.9 - Bug #4743]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-20 17:37:02 +00:00
nobu 3a47cf3395 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
tadf c980b87d07 fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 12:35:49 +00:00
tadf 1348dd26b0 * ext/date/date_{parse,strptime}.c: introduced some macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 09:41:38 +00:00
tadf d54240d35e * ext/date/lib/date/format.rb (_httpdate): omitted to call zone_to_diff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 08:06:40 +00:00
tadf ca5401e481 * ext/date/date_core.c (date_s_test_*): use macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 07:58:11 +00:00
naruse 1f6a7c18f5 * ext/date/date_core.c (DAY_IN_NANOSECONDS): refix: 31438.
check with LONG_MAX and cast as long; without this the calculation
  will be done as int and overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 08:38:36 +00:00
nobu 66fc78d207 * ext/date/date_core.c (DAY_IN_NANOSECONDS): long long int is not
available on all platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-05 13:09:42 +00:00
tadf 322bffd84b * ext/date/date_core.c (date_zone_to_diff): renamed.
* ext/date/date_parse.c: ditto.
	* ext/date/date_strptime.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 16:23:05 +00:00
tadf 9fe4a35e67 * ext/date/date_core.c: modified validation methods.
* ext/date/lib/date.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 16:02:25 +00:00
tadf 91ee771012 * ext/date/date_core.c (dt_lite_set_tmx): should get df value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:02:10 +00:00
tadf b3defabde2 * ext/date/lib/date/format.rb (_iso8601): allowed day only civil
date.  disallowed separatorless day only ordinal date.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 13:36:49 +00:00
tadf 03697bc1f3 * lib/time.rb: require 'date'.
* ext/date/lib/date/format.rb: removed require line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 18:31:47 +00:00
tadf fd93bad83f * ext/date/lib/date/format.rb: require 'date'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 18:09:24 +00:00
tadf 9f103e659e * ext/date/lib/date/format.rb (_iso8601): added a pattern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 18:07:24 +00:00
naruse f3551c0476 * ext/date/lib/date/format.rb: require 'date_core.so'.
date/format needs methods which are now in date_core.so.
  This breaks make rdoc which uses Date._parse from time.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 18:04:47 +00:00
tadf b7133cc6c7 * ext/date/lib/date/format.rb: fixed a bug of regex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 17:48:33 +00:00
tadf 2115af3a46 * ext/date/lib/date/format.rb: an adjustment of regex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 17:13:17 +00:00
tadf 60c7967e12 * ext/date/lib/date/format.rb: omitted to call _parse.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-24 17:00:18 +00:00
tadf bedb18f282 * ext/date/date_parse.c (n2i): takes long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:59:38 +00:00
tadf 4116d8a3bd * ext/date/date_parse.c: reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:51:42 +00:00
naruse c34db58913 * ext/date/date_core.c (leap_p): surpress warning: parentheses.
* ext/date/date_core.c (date_s__parse_internal): remove unused
  variable "str".

* ext/date/date_parse.c (parse_ddd_cb): use RSTRING_LENINT.

* ext/date/date_strftime.c (date_strftime_with_tmx): remove unused
  variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:34:55 +00:00
tadf 05b3bd27d8 * ext/date/date_parse.c: removed some unused macros. use strchr()
instead of index().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 15:35:42 +00:00
tadf 448e0d6668 * ext/date/date_core.c: replacement of implementation of
_parse.  [experimental]
	* ext/date/date_parse.c: new.
	* ext/date/lib/date/format.rb: removed ruby version of _parse.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 12:31:15 +00:00
tadf e8d5304080 * ext/date/date_strptime.c (date__strptime_internal): do not
overwrite local variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-20 12:34:01 +00:00
tadf 1891d8dd3b added date_tmx.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 20:14:58 +00:00
tadf 2b6ab9bf1e * ext/date/date_{core,strftime}.c: use struct tmx instead of vtm.
* ext/date/date_tmx.h: new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 15:22:47 +00:00
tadf 531dfb40e0 typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 13:43:15 +00:00
tadf 10ce57ea8d * ext/date/date_strftime.c (date_strftime_wo_timespec): changed
the way of validation of locale modifiers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 13:26:15 +00:00
tadf ec01a8813f * ext/date/date_core.c: replacement of implementation of
_strptime.  [experimental]
	* ext/date/date_strptime.c: new.
	* ext/date/lib/date/format.rb: removed ruby version of _strptime.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 12:58:28 +00:00
nobu 3e2a0184d0 * ext/date: use timev.h in toplevel.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-30 13:48:32 +00:00
naruse 09a4ae1bbc * ext/date/date_core.c (date_s_today): use int for year.
* ext/date/date_core.c (datetime_s_now): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-28 02:41:31 +00:00
tadf ea490ced11 * ext/date/date_core.c: removed unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-27 02:20:17 +00:00
naruse 4d09e8cd19 * ext/date/lib/date/format.rb (DateTime#strftime): removed because
date_core defines it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 20:29:55 +00:00
naruse 700b778cbb time(3)'s argument and return value is time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 20:29:53 +00:00
tadf e358888d5e * ext/date/date_core.c: should not force cast with macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 13:01:06 +00:00
naruse f9819d0374 * ext/date/date_strftime.c (date_strftime_wo_timespec):
surpress warning: shorten-64-to-32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-21 21:49:00 +00:00
naruse c85be42589 * lib/test/unit/parallel.rb: remove unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-21 21:42:23 +00:00
tadf d9dd52acbf * ext/date/date_strftime.c: checks duplicated modifiers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 14:11:16 +00:00
tadf 7adef00759 * ext/date/date_strftime.c: removed unused code and arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 13:49:27 +00:00
tadf e48047fe0c * ext/date/date_strftime.c: removed unused code and arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 13:34:44 +00:00
tadf 434157444f * ext/date/date_core.c: replacement of implementation of
strftime. It has some limitations that is same as Time's
	  one.  [experimental]
	* ext/date/date_strftime.c: new.
	* ext/date/lib/date/format.c: removed ruby version of strftime.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 12:44:47 +00:00
tadf ec40f71690 * ext/date/date_core.c ({d,dt}_lite_marshal_load): checks the given argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-11 17:28:44 +00:00
tadf af7a09a687 * ext/date/date_core.c: changed some directives.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-11 16:27:25 +00:00
tadf e26e4b2cdf * ext/date/date_core.c, ext/date/lib/*: moved rdoc descriptions.
- この行以下は無視されます --

M    ChangeLog
M    ext/date/date_core.c
M    ext/date/lib/date.rb
M    ext/date/lib/date/format.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-11 16:21:56 +00:00
tadf f809440332 * ext/date/lib: moved from lib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-11 15:07:47 +00:00
nobu 35c9d383a9 fix of ext/date/date_core.
* ext/date/date_core.c (DateTimeData): should not use bare 'long long'
  and 'long double', which are not defined by C89.

* ext/date/date_core.c (dt_lite_plus): get rid of overflow at casting
  down double to integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 23:38:31 +00:00
usa 5d881f0fd4 * ext/date/date_core.c (datetime_s_now): localtime() and localtime_r()
required time_t pointer as 1st parameter, and tv_sec member of struct
  timeval is long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 03:28:24 +00:00
nobu fe060e0e5c * ext/date/date_core.c: adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 14:35:30 +00:00
tadf fdf361189c * lib/date.rb: [Feature #4257]
* ext/date/extconf.rb: new

	* ext/date/date_core.c: new



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 08:10:03 +00:00