date 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of date might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 023fa4cf6c7f68a0f3dc03031ad864c1fe3f748234c20e1bffc1ee2cc9b41ae8
4
- data.tar.gz: 7851c6cccbc8275113236208e093689f62882abf40ff5c7911ca146597d8457a
3
+ metadata.gz: 3ccbc0063defa6a784459e629b4dc402cdb7c35d7ca51bfbe371ac46210b6b59
4
+ data.tar.gz: c5c53dd9af2ea3ddb18ff390c9aa5a89370f6fecd068fba64ff425e5ea192d19
5
5
  SHA512:
6
- metadata.gz: 763d8778816f56ec3f5c2dd8cc81f5ba1c07c9adc4216156faf10170276bd15c07dda24313e4925e4003e7aeb399a8115fe68129d3b3d10833d65443e9de760d
7
- data.tar.gz: c5bb10ba72106dcdb7363fb988e38cb542c27a09dfc19b878966184750845da6e80f7033feb57e72dd9cf1ec23dd4cf0788d765e1f596fe7961dbcaec7905711
6
+ metadata.gz: be4016ed18b870b75821d2af83d30d79d1530b4f79125a042ccad4b67f9e578ec95313bcdfd2113a995c0281be917d14fe0a9b17200f5a8a15b9672f0b6ca146
7
+ data.tar.gz: 44898ccbbc5709310ee930c574d07fd4ea897c41934fbf631a401eabe7876145a8e4914d7e8b27d9525414ea112440f1a26e04409fbb3fcbddd08d6b8538ec44
data/ext/date/date_core.c CHANGED
@@ -4353,7 +4353,7 @@ date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
4353
4353
  * Parses the given representation of date and time, and returns a
4354
4354
  * hash of parsed elements.
4355
4355
  *
4356
- * This method **does not** function as a validator. If the input
4356
+ * This method *does not* function as a validator. If the input
4357
4357
  * string does not match valid formats strictly, you may get a cryptic
4358
4358
  * result. Should consider to use `Date._strptime` or
4359
4359
  * `DateTime._strptime` instead of this method as possible.
@@ -4377,7 +4377,7 @@ date_s__parse(int argc, VALUE *argv, VALUE klass)
4377
4377
  * Parses the given representation of date and time, and creates a
4378
4378
  * date object.
4379
4379
  *
4380
- * This method **does not** function as a validator. If the input
4380
+ * This method *does not* function as a validator. If the input
4381
4381
  * string does not match valid formats strictly, you may get a cryptic
4382
4382
  * result. Should consider to use `Date.strptime` instead of this
4383
4383
  * method as possible.
@@ -6900,7 +6900,7 @@ date_strftime_internal(int argc, VALUE *argv, VALUE self,
6900
6900
  * %c - date and time (%a %b %e %T %Y)
6901
6901
  * %D - Date (%m/%d/%y)
6902
6902
  * %F - The ISO 8601 date format (%Y-%m-%d)
6903
- * %v - VMS date (%e-%b-%Y)
6903
+ * %v - VMS date (%e-%^b-%Y)
6904
6904
  * %x - Same as %D
6905
6905
  * %X - Same as %T
6906
6906
  * %r - 12-hour time (%I:%M:%S %p)
@@ -7797,7 +7797,7 @@ datetime_s_now(int argc, VALUE *argv, VALUE klass)
7797
7797
  #ifdef HAVE_STRUCT_TM_TM_GMTOFF
7798
7798
  of = tm.tm_gmtoff;
7799
7799
  #elif defined(HAVE_TIMEZONE)
7800
- #ifdef HAVE_ALTZONE
7800
+ #if defined(HAVE_ALTZONE) && !defined(_AIX)
7801
7801
  of = (long)-((tm.tm_isdst > 0) ? altzone : timezone);
7802
7802
  #else
7803
7803
  of = (long)-timezone;
@@ -8018,7 +8018,7 @@ datetime_s_strptime(int argc, VALUE *argv, VALUE klass)
8018
8018
  * Parses the given representation of date and time, and creates a
8019
8019
  * DateTime object.
8020
8020
  *
8021
- * This method **does not** function as a validator. If the input
8021
+ * This method *does not* function as a validator. If the input
8022
8022
  * string does not match valid formats strictly, you may get a cryptic
8023
8023
  * result. Should consider to use `DateTime.strptime` instead of this
8024
8024
  * method as possible.
@@ -8380,7 +8380,7 @@ dt_lite_to_s(VALUE self)
8380
8380
  * %c - date and time (%a %b %e %T %Y)
8381
8381
  * %D - Date (%m/%d/%y)
8382
8382
  * %F - The ISO 8601 date format (%Y-%m-%d)
8383
- * %v - VMS date (%e-%b-%Y)
8383
+ * %v - VMS date (%e-%^b-%Y)
8384
8384
  * %x - Same as %D
8385
8385
  * %X - Same as %T
8386
8386
  * %r - 12-hour time (%I:%M:%S %p)
@@ -393,7 +393,7 @@ date_strftime_with_tmx(char *s, const size_t maxsize, const char *format,
393
393
  continue;
394
394
 
395
395
  case 'v':
396
- STRFTIME("%e-%b-%Y");
396
+ STRFTIME("%e-%^b-%Y");
397
397
  continue;
398
398
 
399
399
  case 'w': /* weekday, Sunday == 0, 0 - 6 */
data/ext/date/extconf.rb CHANGED
@@ -3,7 +3,9 @@ require 'mkmf'
3
3
 
4
4
  config_string("strict_warnflags") {|w| $warnflags += " #{w}"}
5
5
 
6
- have_var("timezone", "time.h")
7
- have_var("altzone", "time.h")
6
+ with_werror("", {:werror => true}) do |opt, |
7
+ have_var("timezone", "time.h", opt)
8
+ have_var("altzone", "time.h", opt)
9
+ end
8
10
 
9
11
  create_makefile('date_core')
data/ext/date/prereq.mk CHANGED
@@ -10,3 +10,10 @@ zonetab.h: zonetab.list
10
10
  .PHONY: update-zonetab
11
11
  update-zonetab:
12
12
  $(RUBY) -C $(srcdir) update-abbr
13
+
14
+ .PHONY: update-nothing
15
+ update-nothing:
16
+
17
+ update = nothing
18
+
19
+ zonetab.list: update-$(update)
data/ext/date/zonetab.h CHANGED
@@ -846,7 +846,7 @@ zonetab (register const char *str, register size_t len)
846
846
  {gperf_offsetof(stringpool, 22), 3*3600},
847
847
  {-1},
848
848
  #line 101 "zonetab.list"
849
- {gperf_offsetof(stringpool, 24),10*3600},
849
+ {gperf_offsetof(stringpool, 24),-6*3600},
850
850
  #line 217 "zonetab.list"
851
851
  {gperf_offsetof(stringpool, 25),-18000},
852
852
  #line 19 "zonetab.list"
@@ -875,7 +875,7 @@ zonetab (register const char *str, register size_t len)
875
875
  #line 79 "zonetab.list"
876
876
  {gperf_offsetof(stringpool, 38), 2*3600},
877
877
  #line 65 "zonetab.list"
878
- {gperf_offsetof(stringpool, 39),-10*3600},
878
+ {gperf_offsetof(stringpool, 39),2*3600},
879
879
  {-1},
880
880
  #line 202 "zonetab.list"
881
881
  {gperf_offsetof(stringpool, 41),28800},
@@ -998,7 +998,7 @@ zonetab (register const char *str, register size_t len)
998
998
  #line 148 "zonetab.list"
999
999
  {gperf_offsetof(stringpool, 107), -25200},
1000
1000
  #line 96 "zonetab.list"
1001
- {gperf_offsetof(stringpool, 108), 8*3600},
1001
+ {gperf_offsetof(stringpool, 108), (6*3600+1800)},
1002
1002
  #line 42 "zonetab.list"
1003
1003
  {gperf_offsetof(stringpool, 109), -10*3600},
1004
1004
  #line 31 "zonetab.list"
@@ -1017,11 +1017,11 @@ zonetab (register const char *str, register size_t len)
1017
1017
  {gperf_offsetof(stringpool, 117), 1*3600},
1018
1018
  {-1},
1019
1019
  #line 95 "zonetab.list"
1020
- {gperf_offsetof(stringpool, 119), 7*3600},
1020
+ {gperf_offsetof(stringpool, 119), 2*3600},
1021
1021
  #line 313 "zonetab.list"
1022
1022
  {gperf_offsetof(stringpool, 120),43200},
1023
1023
  #line 55 "zonetab.list"
1024
- {gperf_offsetof(stringpool, 121), -(3*3600+1800)},
1024
+ {gperf_offsetof(stringpool, 121), -(2*3600+1800)},
1025
1025
  #line 184 "zonetab.list"
1026
1026
  {gperf_offsetof(stringpool, 122),31500},
1027
1027
  #line 204 "zonetab.list"
@@ -1168,7 +1168,7 @@ zonetab (register const char *str, register size_t len)
1168
1168
  #line 299 "zonetab.list"
1169
1169
  {gperf_offsetof(stringpool, 206),50400},
1170
1170
  #line 85 "zonetab.list"
1171
- {gperf_offsetof(stringpool, 207), 2*3600},
1171
+ {gperf_offsetof(stringpool, 207), -11*3600},
1172
1172
  {-1},
1173
1173
  #line 142 "zonetab.list"
1174
1174
  {gperf_offsetof(stringpool, 209), 19800},
@@ -1371,7 +1371,7 @@ zonetab (register const char *str, register size_t len)
1371
1371
  {gperf_offsetof(stringpool, 324), 8*3600},
1372
1372
  {-1},
1373
1373
  #line 50 "zonetab.list"
1374
- {gperf_offsetof(stringpool, 326), -(2*3600+1800)},
1374
+ {gperf_offsetof(stringpool, 326), -(1*3600+1800)},
1375
1375
  #line 285 "zonetab.list"
1376
1376
  {gperf_offsetof(stringpool, 327),-10800},
1377
1377
  {-1}, {-1},
data/lib/date.rb CHANGED
@@ -30,6 +30,8 @@ class Date
30
30
  def <=>(other)
31
31
  case other
32
32
  when Infinity; return d <=> other.d
33
+ when Float::INFINITY; return d <=> 1
34
+ when -Float::INFINITY; return d <=> -1
33
35
  when Numeric; return d
34
36
  else
35
37
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: date
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tadayoshi Funaba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-23 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A subclass of Object includes Comparable module for handling dates.
14
14
  email:
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  requirements: []
51
- rubygems_version: 3.2.2
51
+ rubygems_version: 3.2.22
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: A subclass of Object includes Comparable module for handling dates.