date 0.0.1

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.

@@ -0,0 +1,181 @@
1
+ %{
2
+ struct zone {
3
+ int name;
4
+ int offset;
5
+ };
6
+ static const struct zone *zonetab();
7
+ %}
8
+
9
+ struct zone;
10
+ %%
11
+ ut, 0*3600
12
+ gmt, 0*3600
13
+ est, -5*3600
14
+ edt, -4*3600
15
+ cst, -6*3600
16
+ cdt, -5*3600
17
+ mst, -7*3600
18
+ mdt, -6*3600
19
+ pst, -8*3600
20
+ pdt, -7*3600
21
+ a, 1*3600
22
+ b, 2*3600
23
+ c, 3*3600
24
+ d, 4*3600
25
+ e, 5*3600
26
+ f, 6*3600
27
+ g, 7*3600
28
+ h, 8*3600
29
+ i, 9*3600
30
+ k, 10*3600
31
+ l, 11*3600
32
+ m, 12*3600
33
+ n, -1*3600
34
+ o, -2*3600
35
+ p, -3*3600
36
+ q, -4*3600
37
+ r, -5*3600
38
+ s, -6*3600
39
+ t, -7*3600
40
+ u, -8*3600
41
+ v, -9*3600
42
+ w, -10*3600
43
+ x, -11*3600
44
+ y, -12*3600
45
+ z, 0*3600
46
+ utc, 0*3600
47
+ wet, 0*3600
48
+ at, -2*3600
49
+ brst,-2*3600
50
+ ndt, -(2*3600+1800)
51
+ art, -3*3600
52
+ adt, -3*3600
53
+ brt, -3*3600
54
+ clst,-3*3600
55
+ nst, -(3*3600+1800)
56
+ ast, -4*3600
57
+ clt, -4*3600
58
+ akdt,-8*3600
59
+ ydt, -8*3600
60
+ akst,-9*3600
61
+ hadt,-9*3600
62
+ hdt, -9*3600
63
+ yst, -9*3600
64
+ ahst,-10*3600
65
+ cat,-10*3600
66
+ hast,-10*3600
67
+ hst,-10*3600
68
+ nt, -11*3600
69
+ idlw,-12*3600
70
+ bst, 1*3600
71
+ cet, 1*3600
72
+ fwt, 1*3600
73
+ met, 1*3600
74
+ mewt, 1*3600
75
+ mez, 1*3600
76
+ swt, 1*3600
77
+ wat, 1*3600
78
+ west, 1*3600
79
+ cest, 2*3600
80
+ eet, 2*3600
81
+ fst, 2*3600
82
+ mest, 2*3600
83
+ mesz, 2*3600
84
+ sast, 2*3600
85
+ sst, 2*3600
86
+ bt, 3*3600
87
+ eat, 3*3600
88
+ eest, 3*3600
89
+ msk, 3*3600
90
+ msd, 4*3600
91
+ zp4, 4*3600
92
+ zp5, 5*3600
93
+ ist, (5*3600+1800)
94
+ zp6, 6*3600
95
+ wast, 7*3600
96
+ cct, 8*3600
97
+ sgt, 8*3600
98
+ wadt, 8*3600
99
+ jst, 9*3600
100
+ kst, 9*3600
101
+ east,10*3600
102
+ gst, 10*3600
103
+ eadt,11*3600
104
+ idle,12*3600
105
+ nzst,12*3600
106
+ nzt, 12*3600
107
+ nzdt,13*3600
108
+ afghanistan, 16200
109
+ alaskan, -32400
110
+ arab, 10800
111
+ arabian, 14400
112
+ arabic, 10800
113
+ atlantic, -14400
114
+ aus central, 34200
115
+ aus eastern, 36000
116
+ azores, -3600
117
+ canada central, -21600
118
+ cape verde, -3600
119
+ caucasus, 14400
120
+ cen. australia, 34200
121
+ central america, -21600
122
+ central asia, 21600
123
+ central europe, 3600
124
+ central european, 3600
125
+ central pacific, 39600
126
+ central, -21600
127
+ china, 28800
128
+ dateline, -43200
129
+ e. africa, 10800
130
+ e. australia, 36000
131
+ e. europe, 7200
132
+ e. south america, -10800
133
+ eastern, -18000
134
+ egypt, 7200
135
+ ekaterinburg, 18000
136
+ fiji, 43200
137
+ fle, 7200
138
+ greenland, -10800
139
+ greenwich, 0
140
+ gtb, 7200
141
+ hawaiian, -36000
142
+ india, 19800
143
+ iran, 12600
144
+ jerusalem, 7200
145
+ korea, 32400
146
+ mexico, -21600
147
+ mid-atlantic, -7200
148
+ mountain, -25200
149
+ myanmar, 23400
150
+ n. central asia, 21600
151
+ nepal, 20700
152
+ new zealand, 43200
153
+ newfoundland, -12600
154
+ north asia east, 28800
155
+ north asia, 25200
156
+ pacific sa, -14400
157
+ pacific, -28800
158
+ romance, 3600
159
+ russian, 10800
160
+ sa eastern, -10800
161
+ sa pacific, -18000
162
+ sa western, -14400
163
+ samoa, -39600
164
+ se asia, 25200
165
+ malay peninsula, 28800
166
+ south africa, 7200
167
+ sri lanka, 21600
168
+ taipei, 28800
169
+ tasmania, 36000
170
+ tokyo, 32400
171
+ tonga, 46800
172
+ us eastern, -18000
173
+ us mountain, -25200
174
+ vladivostok, 36000
175
+ w. australia, 28800
176
+ w. central africa, 3600
177
+ w. europe, 3600
178
+ west asia, 18000
179
+ west pacific, 36000
180
+ yakutsk, 32400
181
+ %%
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # date.rb: Written by Tadayoshi Funaba 1998-2011
3
+
4
+ require 'date_core'
5
+
6
+ class Date
7
+
8
+ class Infinity < Numeric # :nodoc:
9
+
10
+ include Comparable
11
+
12
+ def initialize(d=1) @d = d <=> 0 end
13
+
14
+ def d() @d end
15
+
16
+ protected :d
17
+
18
+ def zero?() false end
19
+ def finite?() false end
20
+ def infinite?() d.nonzero? end
21
+ def nan?() d.zero? end
22
+
23
+ def abs() self.class.new end
24
+
25
+ def -@() self.class.new(-d) end
26
+ def +@() self.class.new(+d) end
27
+
28
+ def <=>(other)
29
+ case other
30
+ when Infinity; return d <=> other.d
31
+ when Numeric; return d
32
+ else
33
+ begin
34
+ l, r = other.coerce(self)
35
+ return l <=> r
36
+ rescue NoMethodError
37
+ end
38
+ end
39
+ nil
40
+ end
41
+
42
+ def coerce(other)
43
+ case other
44
+ when Numeric; return -d, d
45
+ else
46
+ super
47
+ end
48
+ end
49
+
50
+ def to_f
51
+ return 0 if @d == 0
52
+ if @d > 0
53
+ Float::INFINITY
54
+ else
55
+ -Float::INFINITY
56
+ end
57
+ end
58
+
59
+ end
60
+
61
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: date
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tadayoshi Funaba
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake-compiler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: test-unit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A subclass of Object includes Comparable module for handling dates.
42
+ email:
43
+ -
44
+ executables: []
45
+ extensions:
46
+ - ext/date/extconf.rb
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ext/date/date_core.c
50
+ - ext/date/date_parse.c
51
+ - ext/date/date_strftime.c
52
+ - ext/date/date_strptime.c
53
+ - ext/date/date_tmx.h
54
+ - ext/date/extconf.rb
55
+ - ext/date/prereq.mk
56
+ - ext/date/zonetab.h
57
+ - ext/date/zonetab.list
58
+ - lib/date.rb
59
+ homepage: https://www.ruby-lang.org
60
+ licenses:
61
+ - BSD-2-Clause
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.5.0dev
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.6.12
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: A subclass of Object includes Comparable module for handling dates.
83
+ test_files: []