trk_datatables 0.2.11 → 0.2.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b31d7018f64f25ae41952d0540e64ef9686e28a2aec737c4d2b2fd7efd0fd3c
4
- data.tar.gz: 2ba8567079e3d578705dde71ee0388679bb005b4466d534297615cd837490eb2
3
+ metadata.gz: 07f18203116549f3dedce931bea8ea8c01d61dd550396899b4cfcb50fc52f779
4
+ data.tar.gz: 4f85a893e6b8f281caf64472c61ae7bc28635a45c73dfb6fb9b5fa4f44310b2d
5
5
  SHA512:
6
- metadata.gz: c6004c6612c6389eac26063c4bd8ae4988c368d06315914c5636eb98dbc620101cfc68483fb7cada302b79c83007aab49c6f357e0de45dc9d2cd10eafd1ff800
7
- data.tar.gz: d9e416dba7a23a0c4f1b8d8880a5460fbee44892993718dcea325fe92f89b579c70df9d7ba46d2dd5e37b752ad963d3b173dfa8e48bc489ecd52e4484ed1d770
6
+ metadata.gz: 3e1cce7b7e3f561ba68bba76b7a078f9d7d4980a2805976cff1100d4863f20d25d667c4469d08904cf70ee64ef9a49e199385564c94a7a2fd9df44d443014c82
7
+ data.tar.gz: d1c6ddeb4bc762b7f4af30848466b9478386bfcf9c45cede0f3008cba5772c9ca04d3cd7e2cd2c19fb006e9903078575d51897a174b9cba852045153277ebfc6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trk_datatables (0.2.11)
4
+ trk_datatables (0.2.12)
5
5
  activesupport
6
6
 
7
7
  GEM
@@ -87,12 +87,15 @@ module TrkDatatables
87
87
  # we do not need to cast from string since range will do automatically
88
88
  parsed_from = from
89
89
  parsed_to = to
90
- when :date, :datetime
90
+ when :date
91
+ parsed_from = _parse_in_zone(from).to_date
92
+ parsed_to = _parse_in_zone(to).to_date
93
+ when :datetime
91
94
  parsed_from = _parse_in_zone(from)
92
95
  parsed_to = _parse_in_zone(to)
93
- if parsed_to.present? && !to.match(/AM|PM/)
94
- # we need to add one day since it looks at begining of a day 2010-10-10 00:00:00
95
- parsed_to += 60 * 60 * 24 - 1
96
+ if parsed_to.present? && !to.match(/:/)
97
+ # Use end of a day if time is not defined, for example 2020-02-02
98
+ parsed_to = parsed_to.at_end_of_day
96
99
  end
97
100
  end
98
101
  [parsed_from, parsed_to]
@@ -1,3 +1,3 @@
1
1
  module TrkDatatables
2
- VERSION = '0.2.11'.freeze
2
+ VERSION = '0.2.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trk_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dusan Orlovic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-05 00:00:00.000000000 Z
11
+ date: 2021-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport