Skip to content

Commit f1bced7

Browse files
jrodewigglenacota
andauthored
[DOCS] Correct typos in Painless datetime docs (#50563)
Fixes several typos and grammar errors raised by @glenacota in #47512. Co-authored-by: Guido Lena Cota <[email protected]>
1 parent 68f22fa commit f1bced7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/painless/painless-guide/painless-datetime.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ datetime formatting is a switch from a complex datetime to a string datetime.
4545
A <<painless-api-reference-shared-DateTimeFormatter, DateTimeFormatter>> is a
4646
complex type (<<reference-types, object>>) that defines the allowed sequence
4747
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
4949
DateTimeFormatter see the
5050
{java11-javadoc}/java.base/java/time/format/DateTimeFormatter.html[Java documentation].
5151

@@ -231,8 +231,8 @@ ZonedDateTime updatedZdt = zdt.withYear(1976);
231231

232232
Use either two numeric datetimes or two complex datetimes to calculate the
233233
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
236236
complex datetimes there is often a method or another complex type
237237
(<<reference-types, object>>) available to calculate the difference. Use
238238
<<painless-api-reference-shared-ChronoUnit, ChronoUnit>>
@@ -606,9 +606,9 @@ value for the current document.
606606
==== Datetime Now
607607

608608
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
610610
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
612612
appropriately synchronize `now`. Instead, pass in a user-defined parameter with
613613
either a string datetime or numeric datetime for `now`. A numeric datetime is
614614
preferred as there is no need to parse it for comparison.

0 commit comments

Comments
 (0)