summaryrefslogtreecommitdiff
path: root/time.c
AgeCommit message (Collapse)Author
2008-09-05* include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28* strftime.c (rb_strftime): supported %s and %P.shugo
* time.c (time_strftime): ditto. * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 * time.c (time_asctime): workaround for MSVCRT's bug.usa
based on a patch from wanabe <s.wanabe AT gmail.com> at [ruby-dev:35831] and a suggestion by KIMURA Koichi <kbk AT kt.rim.or.jp> at [ruby-dev:35832] fixed [ruby-dev:35555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22* configure.in (gmtime_r): check if reentrant versions are available.nobu
* time.c (IF_HAVE_GMTIME_R, ASCTIME, GMTIME, LOCALTIME): use reentrant versions if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21* strftime.c (rb_strftime): supported %F and %<precision>N.shugo
reverted config.h to ruby.h for Windows. * test/ruby/test_time.rb (TestTime::test_strftime): added tests for %F and %N. * time.c: documented %F and %N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* configure.in: removed strftime from AC_REPLACE_FUNCS().shugo
* include/ruby/missing.h: removed prototype for strftime(). * missing/strftime.c: removed. * time.c (time_to_s): use rb_strftime() instead of strftime(3). (time_zone): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* strftime.c: new file.shugo
* common.mk (COMMONOBJS): added strftime.$(OBJEXT). * time.c (time_strftime): do not use strftime(3). supported %L(millisecond) and %N(nanosecond). * test/ruby/test_time.rb: added tests for %L and %N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* object.c (rb_obj_untrusted): new method Object#untrusted?.shugo
(rb_obj_untrust): new method Object#untrust. (rb_obj_trust): new method Object#trust. * array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c, string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c, ruby.c, marshal.c: fixes for Object#untrusted?. * test/ruby/test_module.rb, test/ruby/test_array.rb, test/ruby/test_object.rb, test/ruby/test_string.rb, test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for Object#untrusted?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* time.c (time_cmp): retry with right hand operand if its not amatz
time object. [ruby-dev:35011] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),nobu
thread.c (eKillSignal, eTerminateSignal), missing/vsnprintf.c (BSD_vfprintf): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* time.c: fix rounding negative float.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01* suppress warnings on cygwin, mingw and mswin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04* time.c (obj2nsec): fix string argument.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03* time.c (time_timespec): raise TypeError for nil and other objectsakr
which has no divmod method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* error.c (builtin_types), signal.c (siglist), st.c (primes),nobu
struct.c (ref_func), time.c (months): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21* time.c: should include <errno.h> to refer errno.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 * time.c (rb_strftime): check errno to detect strftime(3)'s error.usa
this is workaround for recent version of MSVCRT. [ruby-dev:34456] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09fix doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29* time.c (time_strftime): format should be ascii compatible.matz
* parse.y (rb_intern3): non ASCII compatible symbols. * re.c (rb_reg_regsub): add encoding check. * string.c (rb_str_chomp_bang): ditto. * test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02* time.c (time_cmp): Time.<=> no longer supports comparison withnaruse
numeric. [ruby-core#15332] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24* time.c (make_time_t): revert round trip test. [ruby-dev:33058]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23* time.c (time_strftime): copy encoding from format. [ruby-dev:33303]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04* time.c (time_arg): use converted object. [ruby-core:14759]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* time.c: don't mention an obsolete library, ParseDate.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01* include/ruby/encoding.h (rb_isascii): defined.akr
(rb_isalnum): ditto. (rb_isalpha): ditto. (rb_isblank): ditto. (rb_iscntrl): ditto. (rb_isdigit): ditto. (rb_isgraph): ditto. (rb_islower): ditto. (rb_isprint): ditto. (rb_ispunct): ditto. (rb_isspace): ditto. (rb_isupper): ditto. (rb_isxdigit): ditto. (rb_tolower): ditto. (rb_toupper): ditto. * include/ruby/st.h (st_strcasecmp): declared. (st_strncasecmp): ditto. * st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp. (st_strcasecmp): defined. (st_strncasecmp): ditto. * include/ruby/ruby.h: include include/ruby/encoding.h. (ISASCII): use rb_isascii. (ISPRINT): use rb_isprint. (ISSPACE): use rb_isspace. (ISUPPER): use rb_isupper. (ISLOWER): use rb_islower. (ISALNUM): use rb_isalnum. (ISALPHA): use rb_isalpha. (ISDIGIT): use rb_isdigit. (ISXDIGIT): use rb_isxdigit. (TOUPPER): defined. (TOLOWER): ditto. (STRCASECMP): ditto. (STRNCASECMP): ditto. * dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c, transcode.c, ext/readline/readline.c: use locale insensitive functions. [ruby-core:14662] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28* time.c (make_time_t): verify mktime and timegm result.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15 * cosmetic: fixed a typo in RDoc commentnahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* time.c (time_mload): ignore invalid digits in submicro.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19* configure.in: check struct timespec, clock_gettime, utimensat,akr
struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18* time.c (time_minus): fix Time.at(2**60+1) - Time.at(2**60).akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18* time.c (time_arg): show actual year in 2-3 digits year warning.akr
(time_mdump): show actual year in "year too big to marshal" error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* include/ruby/ruby.h: introduce 2 macros:ko1
RFLOAT_VALUE(v), DOUBLE2NUM(dbl). Rename RFloat#value -> RFloat#double_value. Do not touch RFloat#double_value directly. * bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c, pack.c, parse.y, process.c, random.c, sprintf.c, string.c, time.c: apply above changes. * ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-05* time.c (time_to_s): Fix documentation. Time format changed.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04* time.c (Init_Time): remove obsolete Time::times.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-17* time.c (time_succ): Time#succ should return a time object in thematz
same timezone mode to the original. [ruby-talk:260256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-16* time.c (time_arg): should allow to specify 24:00.matz
[ruby-core:10915] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-31* time.c (time_dup): duplicate the class of original time.matz
[ruby-core:09357] * lib/time.rb (Time::make_time, Time::rfc2822, Time::httpdate): should respect subclasses. [ruby-core:09357] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07* time.c (time_to_s): adopt new date format using digitsmatz
e.g. "2006-09-07 02:03:45 +9000". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-04* time.c (time_to_s): variable declaration after an executionnobu
statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-04* time.c (time_to_s): make it conform to RFC2822 date format.matz
[ruby-dev:29467] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e