@@ -7,6 +7,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
7
7
# This means we can use sub() instead of gsub()
8
8
9
9
if (" G" %in% dt_lett ) {
10
+ # TODO extract the exact substitution to do to avoid problematic
10
11
dt <- sub(" {G}" , dt_G(input_dt , locale ), dt , fixed = TRUE )
11
12
dt <- sub(" {GG}" , dt_G(input_dt , locale ), dt , fixed = TRUE )
12
13
dt <- sub(" {GGG}" , dt_G(input_dt , locale ), dt , fixed = TRUE )
@@ -34,6 +35,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
34
35
}
35
36
36
37
if (" U" %in% dt_lett ) {
38
+ # TODO extract the exact substitution to do to avoid problematic
37
39
dt <- sub(" {U}" , dt_U(input_dt ), dt , fixed = TRUE )
38
40
dt <- sub(" {UU}" , dt_U(input_dt ), dt , fixed = TRUE )
39
41
dt <- sub(" {UUU}" , dt_U(input_dt ), dt , fixed = TRUE )
@@ -47,6 +49,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
47
49
}
48
50
49
51
if (" q" %in% dt_lett ) {
52
+ # TODO extract the exact substitution to do to avoid problematic
50
53
dt <- sub(" {q}" , dt_q(input_dt ), dt , fixed = TRUE )
51
54
dt <- sub(" {qq}" , dt_qq(input_dt ), dt , fixed = TRUE )
52
55
dt <- sub(" {qqq}" , dt_qqq(input_dt , locale ), dt , fixed = TRUE )
@@ -64,6 +67,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
64
67
}
65
68
66
69
if (" L" %in% dt_lett ) {
70
+ # TODO extract the exact substitution to do to avoid problematic
67
71
dt <- sub(" {L}" , dt_L(input_dt ), dt , fixed = TRUE )
68
72
dt <- sub(" {LL}" , dt_LL(input_dt ), dt , fixed = TRUE )
69
73
dt <- sub(" {LLL}" , dt_LLL(input_dt , locale ), dt , fixed = TRUE )
@@ -72,6 +76,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
72
76
}
73
77
74
78
if (" w" %in% dt_lett ) {
79
+ # TODO extract the exact substitution to do to avoid problematic
75
80
dt <- sub(" {w}" , dt_w(input_dt ), dt , fixed = TRUE )
76
81
dt <- sub(" {ww}" , dt_ww(input_dt ), dt , fixed = TRUE )
77
82
}
@@ -95,6 +100,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
95
100
}
96
101
97
102
if (" E" %in% dt_lett ) {
103
+ # TODO extract the exact substitution to do to avoid problematic
98
104
dt <- sub(" {E}" , dt_E(input_dt , locale ), dt , fixed = TRUE )
99
105
dt <- sub(" {EE}" , dt_E(input_dt , locale ), dt , fixed = TRUE )
100
106
dt <- sub(" {EEE}" , dt_E(input_dt , locale ), dt , fixed = TRUE )
@@ -104,6 +110,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
104
110
}
105
111
106
112
if (" e" %in% dt_lett ) {
113
+ # TODO extract the exact substitution to do to avoid problematic
107
114
dt <- sub(" {e}" , dt_e(input_dt , locale ), dt , fixed = TRUE )
108
115
dt <- sub(" {ee}" , dt_ee(input_dt , locale ), dt , fixed = TRUE )
109
116
dt <- sub(" {eee}" , dt_eee(input_dt , locale ), dt , fixed = TRUE )
@@ -113,6 +120,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
113
120
}
114
121
115
122
if (" c" %in% dt_lett ) {
123
+ # TODO extract the exact substitution to do to avoid problematic
116
124
dt <- sub(" {c}" , dt_c(input_dt , locale ), dt , fixed = TRUE )
117
125
dt <- sub(" {cc}" , dt_cc(input_dt , locale ), dt , fixed = TRUE )
118
126
dt <- sub(" {ccc}" , dt_ccc(input_dt , locale ), dt , fixed = TRUE )
@@ -122,6 +130,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
122
130
}
123
131
124
132
if (" a" %in% dt_lett ) {
133
+ # TODO extract the exact substitution to do to avoid problematic
125
134
dt <- sub(" {a}" , dt_a(input_dt , locale ), dt , fixed = TRUE )
126
135
dt <- sub(" {aa}" , dt_a(input_dt , locale ), dt , fixed = TRUE )
127
136
dt <- sub(" {aaa}" , dt_a(input_dt , locale ), dt , fixed = TRUE )
@@ -130,6 +139,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
130
139
}
131
140
132
141
if (" b" %in% dt_lett ) {
142
+ # TODO extract the exact substitution to do to avoid problematic
133
143
dt <- sub(" {b}" , dt_b(input_dt , locale ), dt , fixed = TRUE )
134
144
dt <- sub(" {bb}" , dt_b(input_dt , locale ), dt , fixed = TRUE )
135
145
dt <- sub(" {bbb}" , dt_b(input_dt , locale ), dt , fixed = TRUE )
@@ -138,6 +148,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
138
148
}
139
149
140
150
if (" B" %in% dt_lett ) {
151
+ # TODO extract the exact substitution to do to avoid problematic
141
152
dt <- sub(" {B}" , dt_B(input_dt , locale ), dt , fixed = TRUE )
142
153
dt <- sub(" {BB}" , dt_B(input_dt , locale ), dt , fixed = TRUE )
143
154
dt <- sub(" {BBB}" , dt_B(input_dt , locale ), dt , fixed = TRUE )
@@ -146,6 +157,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
146
157
}
147
158
148
159
if (" h" %in% dt_lett ) {
160
+ # TODO extract the exact substitution to do to avoid problematic
149
161
dt <- sub(" {h}" , dt_h(input_dt ), dt , fixed = TRUE )
150
162
dt <- sub(" {hh}" , dt_hh(input_dt ), dt , fixed = TRUE )
151
163
}
@@ -159,26 +171,31 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
159
171
}
160
172
161
173
if (" K" %in% dt_lett ) {
174
+ # TODO extract the exact substitution to do to avoid problematic
162
175
dt <- sub(" {K}" , dt_K(input_dt ), dt , fixed = TRUE )
163
176
dt <- sub(" {KK}" , dt_KK(input_dt ), dt , fixed = TRUE )
164
177
}
165
178
166
179
if (" k" %in% dt_lett ) {
180
+ # TODO extract the exact substitution to do to avoid problematic
167
181
dt <- sub(" {k}" , dt_k(input_dt ), dt , fixed = TRUE )
168
182
dt <- sub(" {kk}" , dt_kk(input_dt ), dt , fixed = TRUE )
169
183
}
170
184
171
185
if (" m" %in% dt_lett ) {
186
+ # TODO extract the exact substitution to do to avoid problematic
172
187
dt <- sub(" {m}" , dt_m(input_dt ), dt , fixed = TRUE )
173
188
dt <- sub(" {mm}" , dt_mm(input_dt ), dt , fixed = TRUE )
174
189
}
175
190
176
191
if (" s" %in% dt_lett ) {
192
+ # TODO extract the exact substitution to do to avoid problematic
177
193
dt <- sub(" {s}" , dt_s(input_dt ), dt , fixed = TRUE )
178
194
dt <- sub(" {ss}" , dt_ss(input_dt ), dt , fixed = TRUE )
179
195
}
180
196
181
197
if (" S" %in% dt_lett ) {
198
+ # TODO extract the exact substitution to do to avoid problematic
182
199
dt <- sub(" {S}" , dt_S(input_dt ), dt , fixed = TRUE )
183
200
dt <- sub(" {SS}" , dt_SS(input_dt ), dt , fixed = TRUE )
184
201
dt <- sub(" {SSS}" , dt_SSS(input_dt ), dt , fixed = TRUE )
@@ -191,6 +208,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
191
208
}
192
209
193
210
if (" A" %in% dt_lett ) {
211
+ # TODO extract the exact substitution to do to avoid problematic
194
212
dt <- sub(" {A}" , dt_A(input_dt ), dt , fixed = TRUE )
195
213
dt <- sub(" {AA}" , dt_AA(input_dt ), dt , fixed = TRUE )
196
214
dt <- sub(" {AAA}" , dt_AAA(input_dt ), dt , fixed = TRUE )
@@ -203,13 +221,15 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
203
221
}
204
222
205
223
if (" z" %in% dt_lett ) {
224
+ # TODO extract the exact substitution to do to avoid problematic
206
225
dt <- sub(" {z}" , dt_z(input_dt , tz_info , locale ), dt , fixed = TRUE )
207
226
dt <- sub(" {zz}" , dt_z(input_dt , tz_info , locale ), dt , fixed = TRUE )
208
227
dt <- sub(" {zzz}" , dt_z(input_dt , tz_info , locale ), dt , fixed = TRUE )
209
228
dt <- sub(" {zzzz}" , dt_zzzz(input_dt , tz_info , locale ), dt , fixed = TRUE )
210
229
}
211
230
212
231
if (" Z" %in% dt_lett ) {
232
+ # TODO extract the exact substitution to do to avoid problematic
213
233
dt <- sub(" {Z}" , dt_Z(input_dt , tz_info , locale ), dt , fixed = TRUE )
214
234
dt <- sub(" {ZZ}" , dt_Z(input_dt , tz_info , locale ), dt , fixed = TRUE )
215
235
dt <- sub(" {ZZZ}" , dt_Z(input_dt , tz_info , locale ), dt , fixed = TRUE )
@@ -228,13 +248,15 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
228
248
}
229
249
230
250
if (" V" %in% dt_lett ) {
251
+ # TODO extract the exact substitution to do to avoid problematic
231
252
dt <- sub(" {V}" , dt_V(input_dt , tz_info , locale ), dt , fixed = TRUE )
232
253
dt <- sub(" {VV}" , dt_VV(input_dt , tz_info , locale ), dt , fixed = TRUE )
233
254
dt <- sub(" {VVV}" , dt_VVV(input_dt , tz_info , locale ), dt , fixed = TRUE )
234
255
dt <- sub(" {VVVV}" , dt_VVVV(input_dt , tz_info , locale ), dt , fixed = TRUE )
235
256
}
236
257
237
258
if (" X" %in% dt_lett ) {
259
+ # TODO extract the exact substitution to do to avoid problematic
238
260
dt <- sub(" {X}" , dt_X(input_dt , tz_info , locale ), dt , fixed = TRUE )
239
261
dt <- sub(" {XX}" , dt_XX(input_dt , tz_info , locale ), dt , fixed = TRUE )
240
262
dt <- sub(" {XXX}" , dt_XXX(input_dt , tz_info , locale ), dt , fixed = TRUE )
@@ -243,6 +265,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
243
265
}
244
266
245
267
if (" x" %in% dt_lett ) {
268
+ # TODO extract the exact substitution to do to avoid problematic
246
269
dt <- sub(" {x}" , dt_x(input_dt , tz_info , locale ), dt , fixed = TRUE )
247
270
dt <- sub(" {xx}" , dt_xx(input_dt , tz_info , locale ), dt , fixed = TRUE )
248
271
dt <- sub(" {xxx}" , dt_xxx(input_dt , tz_info , locale ), dt , fixed = TRUE )
@@ -251,6 +274,7 @@ dt_replace <- function(dt, input_dt, dt_lett, locale, tz_info) {
251
274
}
252
275
253
276
if (" g" %in% dt_lett ) {
277
+ # TODO extract the exact substitution to do to avoid problematic
254
278
dt <- sub(" {g}" , dt_g(input_dt ), dt , fixed = TRUE )
255
279
dt <- sub(" {gg}" , dt_gg(input_dt ), dt , fixed = TRUE )
256
280
dt <- sub(" {ggg}" , dt_ggg(input_dt ), dt , fixed = TRUE )
0 commit comments