ed-precompiled_date 3.4.1-arm64-darwin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/BSDL +22 -0
- data/COPYING +56 -0
- data/README.md +102 -0
- data/ext/date/date_core.c +10066 -0
- data/ext/date/date_parse.c +3086 -0
- data/ext/date/date_strftime.c +638 -0
- data/ext/date/date_strptime.c +704 -0
- data/ext/date/date_tmx.h +56 -0
- data/ext/date/extconf.rb +13 -0
- data/ext/date/prereq.mk +19 -0
- data/ext/date/zonetab.h +1564 -0
- data/ext/date/zonetab.list +330 -0
- data/lib/3.0/date_core.bundle +0 -0
- data/lib/3.1/date_core.bundle +0 -0
- data/lib/3.2/date_core.bundle +0 -0
- data/lib/3.3/date_core.bundle +0 -0
- data/lib/3.4/date_core.bundle +0 -0
- data/lib/date.rb +75 -0
- metadata +63 -0
data/ext/date/date_tmx.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#ifndef DATE_TMX_H
|
|
2
|
+
#define DATE_TMX_H
|
|
3
|
+
|
|
4
|
+
struct tmx_funcs {
|
|
5
|
+
VALUE (*year)(void *dat);
|
|
6
|
+
int (*yday)(void *dat);
|
|
7
|
+
int (*mon)(void *dat);
|
|
8
|
+
int (*mday)(void *dat);
|
|
9
|
+
VALUE (*cwyear)(void *dat);
|
|
10
|
+
int (*cweek)(void *dat);
|
|
11
|
+
int (*cwday)(void *dat);
|
|
12
|
+
int (*wnum0)(void *dat);
|
|
13
|
+
int (*wnum1)(void *dat);
|
|
14
|
+
int (*wday)(void *dat);
|
|
15
|
+
int (*hour)(void *dat);
|
|
16
|
+
int (*min)(void *dat);
|
|
17
|
+
int (*sec)(void *dat);
|
|
18
|
+
VALUE (*sec_fraction)(void *dat);
|
|
19
|
+
VALUE (*secs)(void *dat);
|
|
20
|
+
VALUE (*msecs)(void *dat);
|
|
21
|
+
int (*offset)(void *dat);
|
|
22
|
+
char *(*zone)(void *dat);
|
|
23
|
+
};
|
|
24
|
+
struct tmx {
|
|
25
|
+
void *dat;
|
|
26
|
+
const struct tmx_funcs *funcs;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
#define tmx_attr(x) (tmx->funcs->x)(tmx->dat)
|
|
30
|
+
|
|
31
|
+
#define tmx_year tmx_attr(year)
|
|
32
|
+
#define tmx_yday tmx_attr(yday)
|
|
33
|
+
#define tmx_mon tmx_attr(mon)
|
|
34
|
+
#define tmx_mday tmx_attr(mday)
|
|
35
|
+
#define tmx_cwyear tmx_attr(cwyear)
|
|
36
|
+
#define tmx_cweek tmx_attr(cweek)
|
|
37
|
+
#define tmx_cwday tmx_attr(cwday)
|
|
38
|
+
#define tmx_wnum0 tmx_attr(wnum0)
|
|
39
|
+
#define tmx_wnum1 tmx_attr(wnum1)
|
|
40
|
+
#define tmx_wday tmx_attr(wday)
|
|
41
|
+
#define tmx_hour tmx_attr(hour)
|
|
42
|
+
#define tmx_min tmx_attr(min)
|
|
43
|
+
#define tmx_sec tmx_attr(sec)
|
|
44
|
+
#define tmx_sec_fraction tmx_attr(sec_fraction)
|
|
45
|
+
#define tmx_secs tmx_attr(secs)
|
|
46
|
+
#define tmx_msecs tmx_attr(msecs)
|
|
47
|
+
#define tmx_offset tmx_attr(offset)
|
|
48
|
+
#define tmx_zone tmx_attr(zone)
|
|
49
|
+
|
|
50
|
+
#endif
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
Local variables:
|
|
54
|
+
c-file-style: "ruby"
|
|
55
|
+
End:
|
|
56
|
+
*/
|
data/ext/date/extconf.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'mkmf'
|
|
3
|
+
|
|
4
|
+
config_string("strict_warnflags") {|w| $warnflags += " #{w}"}
|
|
5
|
+
|
|
6
|
+
append_cflags("-Wno-compound-token-split-by-macro") if RUBY_VERSION < "2.7."
|
|
7
|
+
have_func("rb_category_warn")
|
|
8
|
+
with_werror("", {:werror => true}) do |opt, |
|
|
9
|
+
have_var("timezone", "time.h", opt)
|
|
10
|
+
have_var("altzone", "time.h", opt)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
create_makefile('date_core')
|
data/ext/date/prereq.mk
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.SUFFIXES: .list
|
|
2
|
+
|
|
3
|
+
.list.h:
|
|
4
|
+
gperf --ignore-case -L ANSI-C -C -c -P -p -j1 -i 1 -g -o -t -N $(*F) $< \
|
|
5
|
+
| sed -f $(top_srcdir)/tool/gperf.sed \
|
|
6
|
+
> $(@F)
|
|
7
|
+
|
|
8
|
+
zonetab.h: zonetab.list
|
|
9
|
+
|
|
10
|
+
.PHONY: update-zonetab
|
|
11
|
+
update-zonetab:
|
|
12
|
+
$(RUBY) -C $(srcdir) update-abbr
|
|
13
|
+
|
|
14
|
+
.PHONY: update-nothing
|
|
15
|
+
update-nothing:
|
|
16
|
+
|
|
17
|
+
update = nothing
|
|
18
|
+
|
|
19
|
+
zonetab.list: update-$(update)
|