@@ -45,7 +45,7 @@ datetime formatting is a switch from a complex datetime to a string datetime.
45
45
A <<painless-api-reference-shared-DateTimeFormatter, DateTimeFormatter>> is a
46
46
complex type (<<reference-types, object>>) that defines the allowed sequence
47
47
of characters for a string datetime. Datetime parsing and formatting often
48
- requires a DateTimeFormatter. For more information about how to use a
48
+ require a DateTimeFormatter. For more information about how to use a
49
49
DateTimeFormatter see the
50
50
{java11-javadoc}/java.base/java/time/format/DateTimeFormatter.html[Java documentation].
51
51
@@ -231,8 +231,8 @@ ZonedDateTime updatedZdt = zdt.withYear(1976);
231
231
232
232
Use either two numeric datetimes or two complex datetimes to calculate the
233
233
difference (elapsed time) between two different datetimes. Use
234
- <<subtraction-operator, subtraction>> to calculate the difference between
235
- between two numeric datetimes of the same time unit such as milliseconds. For
234
+ <<subtraction-operator, subtraction>> to calculate the difference between two
235
+ numeric datetimes of the same time unit such as milliseconds. For
236
236
complex datetimes there is often a method or another complex type
237
237
(<<reference-types, object>>) available to calculate the difference. Use
238
238
<<painless-api-reference-shared-ChronoUnit, ChronoUnit>>
@@ -606,9 +606,9 @@ value for the current document.
606
606
==== Datetime Now
607
607
608
608
Under most Painless contexts the current datetime, `now`, is not supported.
609
- There are two primary reasons for this. The first is scripts are often run once
609
+ There are two primary reasons for this. The first is that scripts are often run once
610
610
per document, so each time the script is run a different `now` is returned. The
611
- second is scripts are often run in a distributed fashion without a way to
611
+ second is that scripts are often run in a distributed fashion without a way to
612
612
appropriately synchronize `now`. Instead, pass in a user-defined parameter with
613
613
either a string datetime or numeric datetime for `now`. A numeric datetime is
614
614
preferred as there is no need to parse it for comparison.
0 commit comments