code-ruby 1.6.7 → 1.6.8
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 +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/code/object/date.rb +72 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfecf488db7e87ce3bf0ae42b96e59d461da699e13e409c5e7a39270a91cf649
|
4
|
+
data.tar.gz: 84fd037a8da87db0d65efe954c991a42e2c5a6518f187a98161456df900cb1a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d268f230b54035c79ab026f17937d2513b4c0842635bdf16451b6437afb88e7afe247f56e76fd30cce2e42ef4e1dcb60422bf4a7a518d2f57594739571df160
|
7
|
+
data.tar.gz: 15626cf097a170630a77f21b3b557249fc85e4aad6761533247d6ea362df2fb26398ca08e22cafaebbe869143a0b265656e1cceeee313e57c49633f3d20cd197
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.8
|
data/lib/code/object/date.rb
CHANGED
@@ -222,10 +222,15 @@ class Code
|
|
222
222
|
sig(args) do
|
223
223
|
{
|
224
224
|
year: (String | Integer).maybe,
|
225
|
+
years: (String | Integer).maybe,
|
225
226
|
month: (String | Integer).maybe,
|
227
|
+
months: (String | Integer).maybe,
|
226
228
|
day: (String | Integer).maybe,
|
229
|
+
days: (String | Integer).maybe,
|
227
230
|
week_day: (String | Integer).maybe,
|
228
|
-
|
231
|
+
week_days: (String | Integer).maybe,
|
232
|
+
week: (String | Integer).maybe,
|
233
|
+
weeks: (String | Integer).maybe
|
229
234
|
}
|
230
235
|
end
|
231
236
|
|
@@ -234,20 +239,30 @@ class Code
|
|
234
239
|
else
|
235
240
|
code_add(
|
236
241
|
year: code_value.code_get(:year),
|
242
|
+
years: code_value.code_get(:years),
|
237
243
|
month: code_value.code_get(:month),
|
244
|
+
months: code_value.code_get(:months),
|
238
245
|
day: code_value.code_get(:day),
|
246
|
+
days: code_value.code_get(:days),
|
239
247
|
week_day: code_value.code_get(:week_day),
|
240
|
-
|
248
|
+
week_days: code_value.code_get(:week_days),
|
249
|
+
week: code_value.code_get(:week),
|
250
|
+
weeks: code_value.code_get(:weeks)
|
241
251
|
)
|
242
252
|
end
|
243
253
|
when "substract"
|
244
254
|
sig(args) do
|
245
255
|
{
|
246
256
|
year: (String | Integer).maybe,
|
257
|
+
years: (String | Integer).maybe,
|
247
258
|
month: (String | Integer).maybe,
|
259
|
+
months: (String | Integer).maybe,
|
248
260
|
day: (String | Integer).maybe,
|
261
|
+
days: (String | Integer).maybe,
|
249
262
|
week_day: (String | Integer).maybe,
|
250
|
-
|
263
|
+
week_days: (String | Integer).maybe,
|
264
|
+
week: (String | Integer).maybe,
|
265
|
+
weeks: (String | Integer).maybe
|
251
266
|
}
|
252
267
|
end
|
253
268
|
|
@@ -256,20 +271,30 @@ class Code
|
|
256
271
|
else
|
257
272
|
code_substract(
|
258
273
|
year: code_value.code_get(:year),
|
274
|
+
years: code_value.code_get(:years),
|
259
275
|
month: code_value.code_get(:month),
|
276
|
+
months: code_value.code_get(:months),
|
260
277
|
day: code_value.code_get(:day),
|
278
|
+
days: code_value.code_get(:days),
|
261
279
|
week_day: code_value.code_get(:week_day),
|
262
|
-
|
280
|
+
week_days: code_value.code_get(:week_days),
|
281
|
+
week: code_value.code_get(:week),
|
282
|
+
weeks: code_value.code_get(:weeks)
|
263
283
|
)
|
264
284
|
end
|
265
285
|
when "change"
|
266
286
|
sig(args) do
|
267
287
|
{
|
268
288
|
year: (String | Integer).maybe,
|
289
|
+
years: (String | Integer).maybe,
|
269
290
|
month: (String | Integer).maybe,
|
291
|
+
months: (String | Integer).maybe,
|
270
292
|
day: (String | Integer).maybe,
|
293
|
+
days: (String | Integer).maybe,
|
271
294
|
week_day: (String | Integer).maybe,
|
272
|
-
|
295
|
+
week_days: (String | Integer).maybe,
|
296
|
+
week: (String | Integer).maybe,
|
297
|
+
weeks: (String | Integer).maybe
|
273
298
|
}
|
274
299
|
end
|
275
300
|
|
@@ -278,10 +303,15 @@ class Code
|
|
278
303
|
else
|
279
304
|
code_change(
|
280
305
|
year: code_value.code_get(:year),
|
306
|
+
years: code_value.code_get(:years),
|
281
307
|
month: code_value.code_get(:month),
|
308
|
+
months: code_value.code_get(:months),
|
282
309
|
day: code_value.code_get(:day),
|
310
|
+
days: code_value.code_get(:days),
|
283
311
|
week_day: code_value.code_get(:week_day),
|
284
|
-
|
312
|
+
week_days: code_value.code_get(:week_days),
|
313
|
+
week: code_value.code_get(:week),
|
314
|
+
weeks: code_value.code_get(:weeks)
|
285
315
|
)
|
286
316
|
end
|
287
317
|
else
|
@@ -419,10 +449,15 @@ class Code
|
|
419
449
|
sig(args) do
|
420
450
|
{
|
421
451
|
year: (String | Integer).maybe,
|
452
|
+
years: (String | Integer).maybe,
|
422
453
|
month: (String | Integer).maybe,
|
454
|
+
months: (String | Integer).maybe,
|
423
455
|
day: (String | Integer).maybe,
|
456
|
+
days: (String | Integer).maybe,
|
424
457
|
week_day: (String | Integer).maybe,
|
425
|
-
|
458
|
+
week_days: (String | Integer).maybe,
|
459
|
+
week: (String | Integer).maybe,
|
460
|
+
weeks: (String | Integer).maybe
|
426
461
|
}
|
427
462
|
end
|
428
463
|
|
@@ -431,20 +466,30 @@ class Code
|
|
431
466
|
else
|
432
467
|
code_add(
|
433
468
|
year: code_value.code_get(:year),
|
469
|
+
years: code_value.code_get(:years),
|
434
470
|
month: code_value.code_get(:month),
|
471
|
+
months: code_value.code_get(:months),
|
435
472
|
day: code_value.code_get(:day),
|
473
|
+
days: code_value.code_get(:days),
|
436
474
|
week_day: code_value.code_get(:week_day),
|
437
|
-
|
475
|
+
week_days: code_value.code_get(:week_days),
|
476
|
+
week: code_value.code_get(:week),
|
477
|
+
weeks: code_value.code_get(:weeks)
|
438
478
|
)
|
439
479
|
end
|
440
480
|
when "substract"
|
441
481
|
sig(args) do
|
442
482
|
{
|
443
483
|
year: (String | Integer).maybe,
|
484
|
+
years: (String | Integer).maybe,
|
444
485
|
month: (String | Integer).maybe,
|
486
|
+
months: (String | Integer).maybe,
|
445
487
|
day: (String | Integer).maybe,
|
488
|
+
days: (String | Integer).maybe,
|
446
489
|
week_day: (String | Integer).maybe,
|
447
|
-
|
490
|
+
week_days: (String | Integer).maybe,
|
491
|
+
week: (String | Integer).maybe,
|
492
|
+
weeks: (String | Integer).maybe
|
448
493
|
}
|
449
494
|
end
|
450
495
|
|
@@ -453,20 +498,30 @@ class Code
|
|
453
498
|
else
|
454
499
|
code_substract(
|
455
500
|
year: code_value.code_get(:year),
|
501
|
+
years: code_value.code_get(:years),
|
456
502
|
month: code_value.code_get(:month),
|
503
|
+
months: code_value.code_get(:months),
|
457
504
|
day: code_value.code_get(:day),
|
505
|
+
days: code_value.code_get(:days),
|
458
506
|
week_day: code_value.code_get(:week_day),
|
459
|
-
|
507
|
+
week_days: code_value.code_get(:week_days),
|
508
|
+
week: code_value.code_get(:week),
|
509
|
+
weeks: code_value.code_get(:weeks)
|
460
510
|
)
|
461
511
|
end
|
462
512
|
when "change"
|
463
513
|
sig(args) do
|
464
514
|
{
|
465
515
|
year: (String | Integer).maybe,
|
516
|
+
years: (String | Integer).maybe,
|
466
517
|
month: (String | Integer).maybe,
|
518
|
+
months: (String | Integer).maybe,
|
467
519
|
day: (String | Integer).maybe,
|
520
|
+
days: (String | Integer).maybe,
|
468
521
|
week_day: (String | Integer).maybe,
|
469
|
-
|
522
|
+
week_days: (String | Integer).maybe,
|
523
|
+
week: (String | Integer).maybe,
|
524
|
+
weeks: (String | Integer).maybe
|
470
525
|
}
|
471
526
|
end
|
472
527
|
|
@@ -475,10 +530,15 @@ class Code
|
|
475
530
|
else
|
476
531
|
code_change(
|
477
532
|
year: code_value.code_get(:year),
|
533
|
+
years: code_value.code_get(:years),
|
478
534
|
month: code_value.code_get(:month),
|
535
|
+
months: code_value.code_get(:months),
|
479
536
|
day: code_value.code_get(:day),
|
537
|
+
days: code_value.code_get(:days),
|
480
538
|
week_day: code_value.code_get(:week_day),
|
481
|
-
|
539
|
+
week_days: code_value.code_get(:week_days),
|
540
|
+
week: code_value.code_get(:week),
|
541
|
+
weeks: code_value.code_get(:weeks)
|
482
542
|
)
|
483
543
|
end
|
484
544
|
else
|