Skip to content

Commit 0f73e1f

Browse files
johnnyshieldsp
andauthored
MONGOID-5324 Remove deprecated EPOCH constant from Date and Time (#5239)
* Remove EPOCH constant from Date and Time. It is not used anywhere. * add release note Co-authored-by: shields <[email protected]> Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 8a00eb8 commit 0f73e1f

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

docs/release-notes/mongoid-8.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,6 @@ Removed Deprecated Constants
324324
Mongoid 8 removes the following deprecated constants that are not expected
325325
to have been used outside of Mongoid:
326326

327+
- ``Mongoid::Extensions::Date::EPOCH``
328+
- ``Mongoid::Extensions::Time::EPOCH``
327329
- ``Mongoid::Factory::TYPE``

lib/mongoid/extensions/date.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ module Mongoid
44
module Extensions
55
module Date
66

7-
# Constant for epoch - used when passing invalid times.
8-
#
9-
# @deprecated No longer used as a return value from #mongoize passed
10-
# an invalid date string.
11-
EPOCH = ::Date.new(1970, 1, 1)
12-
137
# Convert the date into a time.
148
#
159
# @example Convert the date to a time.

lib/mongoid/extensions/time.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ def __mongoize_time__
1414
self
1515
end
1616

17-
# Constant for epoch - used when passing invalid times.
18-
#
19-
# @deprecated No longer used as a return value from #mongoize passed
20-
# an invalid time string.
21-
EPOCH = ::Time.utc(1970, 1, 1, 0, 0, 0)
22-
2317
# Turn the object from the ruby type we deal with to a Mongo friendly
2418
# type.
2519
#

0 commit comments

Comments
 (0)