We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 137100e commit fd4aaa8Copy full SHA for fd4aaa8
README.adoc
@@ -1662,6 +1662,21 @@ Avoid using negative numbers for the duration subject. Always prefer using a qua
1662
5.hours.from_now
1663
----
1664
1665
+=== Duration Arithmetic
1666
+
1667
+Use Duration methods instead of adding and subtracting with the current time.
1668
1669
+[source,ruby]
1670
+----
1671
+# bad
1672
+Time.current - 1.minute
1673
+Time.zone.now + 2.days
1674
1675
+# good
1676
+1.minute.ago
1677
+2.days.from_now
1678
1679
1680
== Bundler
1681
1682
=== Dev/Test Gems [[dev-test-gems]]
0 commit comments