From 42f0f5a4e740445a2c5f0e7e37dbdf44283946ea Mon Sep 17 00:00:00 2001 From: Evgeniy Osintsev Date: Wed, 10 Aug 2022 14:49:26 +0400 Subject: [PATCH 1/5] Add description of the add() and sub() methods Part of #2853 --- .../datetime/datetime_object.rst | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/doc/reference/reference_lua/datetime/datetime_object.rst b/doc/reference/reference_lua/datetime/datetime_object.rst index b52ebeb79b..cec36f6ac7 100644 --- a/doc/reference/reference_lua/datetime/datetime_object.rst +++ b/doc/reference/reference_lua/datetime/datetime_object.rst @@ -243,3 +243,140 @@ datetime_object - 1970-01-01T03:00:00.125+0300 ... + .. _datetime-add: + + .. method:: add( { input[, adjust ] } ) + + Modify an existing datetime object by adding values of the input argument. [TBD] + + :param table input: an :ref:`interval object ` or an equivalent table (see **Example #1**) + :param string adjust: defines how to round days in a month after an arithmetic operation. + Possible values: ``none``, ``last``, ``excess`` (see **Example #2**). Defaults to ``none``. + + :return: datetime_object + :rtype: cdata + + **Example #1:** + + .. code-block:: tarantoolsession + + tarantool> dt = datetime.new { + day = 26, + month = 8, + year = 2021, + tzoffset = 180 + } + --- + ... + + tarantool> iv = datetime.interval.new {day = 7} + --- + ... + + tarantool> dt, iv + --- + - 2021-08-26T00:00:00+0300 + - +7 days + ... + + tarantool> dt:add(iv) + --- + - 2021-09-02T00:00:00+0300 + ... + + tarantool> dt:add{ day = 7 } + --- + - 2021-09-09T00:00:00+0300 + ... + + .. _datetime-add-example2: + + **Example #2:** + + .. code-block:: tarantoolsession + + tarantool> dt = datetime.new { + day = 29, + month = 2, + year = 2020 + } + --- + ... + + tarantool> dt:add{month = 1, adjust = 'none'} + --- + - 2020-03-29T00:00:00Z + ... + + tarantool> dt = datetime.new { + day = 29, + month = 2, + year = 2020 + } + --- + ... + + tarantool> dt:add{month = 1, adjust = 'last'} + --- + - 2020-03-31T00:00:00Z + ... + + tarantool> dt = datetime.new { + day = 31, + month = 1, + year = 2020 + } + --- + ... + + tarantool> dt:add{month = 1, adjust = 'exсess'} + --- + - 2020-03-02T00:00:00Z + ... + + .. _datetime-sub: + + .. method:: sub( { input[, adjust ] } ) + + Modify an existing datetime object by subtracting values of the input argument. [TBD] + + :param table input: an :ref:`interval object ` or an equivalent table (see **Example**) + :param string adjust: defines how to round days in a month after an arithmetic operation. + Possible values: ``none``, ``last``, ``excess``. Defaults to ``none``. + The logic is similar to the one of the ``:add()`` method -- see :ref:`Example #2 `. [TBD] + + :return: datetime_object + :rtype: cdata + + **Example:** + + .. code-block:: tarantoolsession + + tarantool> dt = datetime.new { + day = 26, + month = 8, + year = 2021, + tzoffset = 180 + } + --- + ... + + tarantool> iv = datetime.interval.new {day = 5} + --- + ... + + tarantool> dt, iv + --- + - 2021-08-26T00:00:00+0300 + - +5 days + ... + + tarantool> dt:sub(iv) + --- + - 2021-08-21T00:00:00+0300 + ... + + tarantool> dt:sub{ day = 1 } + --- + - 2021-08-20T00:00:00+0300 + ... From ba78d12e09f59aafd90648d8356488ac6cbdce4a Mon Sep 17 00:00:00 2001 From: Evgeniy Osintsev Date: Fri, 12 Aug 2022 13:02:16 +0400 Subject: [PATCH 2/5] Add description of the totable() method for an interval object; correct the list of the datetime functions and methods Part of #2835 --- doc/reference/reference_lua/datetime.rst | 13 +++- .../datetime/datetime_object.rst | 4 +- .../reference_lua/datetime/interval_new.rst | 13 +++- .../datetime/interval_object.rst | 75 +++++++++++++++++++ doc/reference/reference_lua/datetime/new.rst | 2 +- 5 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 doc/reference/reference_lua/datetime/interval_object.rst diff --git a/doc/reference/reference_lua/datetime.rst b/doc/reference/reference_lua/datetime.rst index 807311eaf9..9d06ebbd68 100644 --- a/doc/reference/reference_lua/datetime.rst +++ b/doc/reference/reference_lua/datetime.rst @@ -28,15 +28,26 @@ Below is a list of the ``datetime`` module functions and methods. * - :ref:`format() ` - Convert the standard presentation of a ``datetime`` object into a formatted string. - * - :ref:`totable() ` + * - :ref:`datetime_object:totable() ` - Convert the information from a ``datetime`` object into the table format. * - :ref:`set() ` - Update the field values in the existing ``datetime`` object. + * - :ref:`parse() ` + - Convert an input string with the date and time information into a ``datetime`` object. + + * - :ref:`add() ` + - Modify an existing datetime object by adding ... [TBD] + + * - :ref:`sub() ` + - Modify an existing datetime object by subtracting ... [TBD] + * - :doc:`./datetime/interval_new` - Create an ``interval`` object from a table of time units. + * - :ref:`interval_object:totable() ` + - Convert the information from an ``interval`` object into the table format. .. toctree:: :hidden: diff --git a/doc/reference/reference_lua/datetime/datetime_object.rst b/doc/reference/reference_lua/datetime/datetime_object.rst index cec36f6ac7..23cb0df89e 100644 --- a/doc/reference/reference_lua/datetime/datetime_object.rst +++ b/doc/reference/reference_lua/datetime/datetime_object.rst @@ -11,7 +11,7 @@ datetime_object .. method:: totable() - Convert the information from the ``datetime`` object into the table format. + Convert the information from a ``datetime`` object into the table format. Resulting table has the following fields: .. container:: table @@ -245,7 +245,7 @@ datetime_object .. _datetime-add: - .. method:: add( { input[, adjust ] } ) + .. method:: add( input[, { adjust } ] ) Modify an existing datetime object by adding values of the input argument. [TBD] diff --git a/doc/reference/reference_lua/datetime/interval_new.rst b/doc/reference/reference_lua/datetime/interval_new.rst index 33804c9a38..b114f79e61 100644 --- a/doc/reference/reference_lua/datetime/interval_new.rst +++ b/doc/reference/reference_lua/datetime/interval_new.rst @@ -3,14 +3,14 @@ datetime.interval.new() ======================= -.. function:: datetime.interval.new( [{ units }] ) +.. function:: datetime.interval.new( [{ input }] ) Since :doc:`2.10.0 `. Create an object of the :ref:`interval type ` from a table of time units. See :ref:`description of units ` and :ref:`examples ` below. - :param table units: Table of :ref:`time units `. For all possible time units, the values are not restricted. + :param table input: Table with :ref:`time units and parameters`. For all possible time units, the values are not restricted. If an empty table or no arguments are passed, the ``interval`` object with the default value ``0 seconds`` is created. :return: :doc: interval object @@ -18,7 +18,7 @@ datetime.interval.new() .. _interval-new-args: - **Possible input time units for ``datetime.interval.new()** + **Possible input time units and parameters for ``datetime.interval.new()** .. container:: table @@ -68,10 +68,15 @@ datetime.interval.new() - 0 * - year - - Year + - Year. ... [TBD year range and huge year number support] - number - 0 + * - adjust + - ... [TBD] + - string + - 'none' + .. _interval-new-example: **Examples:** diff --git a/doc/reference/reference_lua/datetime/interval_object.rst b/doc/reference/reference_lua/datetime/interval_object.rst new file mode 100644 index 0000000000..d278bb399f --- /dev/null +++ b/doc/reference/reference_lua/datetime/interval_object.rst @@ -0,0 +1,75 @@ +.. _inverval_object: + +inverval_object +=============== + +.. class:: interval_object + + Since :doc:`2.10.0 `. + + .. _inverval-totable: + + .. method:: totable() + + Convert the information from an ``interval`` object into the table format. + Resulting table has the following fields: + + .. container:: table + + .. list-table:: + :widths: 30 70 + :header-rows: 1 + + * - Field name + - Description + + * - nsec + - Nanosecods + + * - sec + - Seconds + + * - min + - Minutes + + * - hour + - Hours + + * - day + - Day number + + * - month + - Month number + + * - year + - Year + + * - week + - Week number + + * - adjust + - ... [TBD] + + :return: table with the date and time parameters + :rtype: table + + **Example:** + + .. code-block:: tarantoolsession + + tarantool> iv = datetime.interval.new{month = 1, adjust = 'last'} + --- + ... + + tarantool> iv:totable() + --- + - adjust: last + sec: 0 + nsec: 0 + day: 0 + week: 0 + hour: 0 + month: 1 + year: 0 + min: 0 + ... diff --git a/doc/reference/reference_lua/datetime/new.rst b/doc/reference/reference_lua/datetime/new.rst index 19c88b238d..51f7cdd38e 100644 --- a/doc/reference/reference_lua/datetime/new.rst +++ b/doc/reference/reference_lua/datetime/new.rst @@ -63,7 +63,7 @@ datetime.new() - 1 * - year - - Year + - Year. ... [TBD year range and huge year number support] - number - 1970 From 27e9dff323f6fffe97c9b53d98dea47f26b39e17 Mon Sep 17 00:00:00 2001 From: Evgeniy Osintsev Date: Mon, 15 Aug 2022 12:57:30 +0300 Subject: [PATCH 3/5] Update info about arithmetic operations with datetime and interal objects Part of #2835 --- doc/reference/reference_lua/datetime.rst | 3 + .../datetime/datetime_object.rst | 8 +- .../datetime/interval_arithm.rst | 94 +++++++++++++++++++ .../reference_lua/datetime/interval_new.rst | 2 +- doc/reference/reference_lua/datetime/new.rst | 2 +- 5 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 doc/reference/reference_lua/datetime/interval_arithm.rst diff --git a/doc/reference/reference_lua/datetime.rst b/doc/reference/reference_lua/datetime.rst index 9d06ebbd68..5ff64e3011 100644 --- a/doc/reference/reference_lua/datetime.rst +++ b/doc/reference/reference_lua/datetime.rst @@ -49,6 +49,9 @@ Below is a list of the ``datetime`` module functions and methods. * - :ref:`interval_object:totable() ` - Convert the information from an ``interval`` object into the table format. + * - :doc:`./datetime/interval_arithm` + - ... [TBD] + .. toctree:: :hidden: diff --git a/doc/reference/reference_lua/datetime/datetime_object.rst b/doc/reference/reference_lua/datetime/datetime_object.rst index 23cb0df89e..b96f955434 100644 --- a/doc/reference/reference_lua/datetime/datetime_object.rst +++ b/doc/reference/reference_lua/datetime/datetime_object.rst @@ -92,14 +92,14 @@ datetime_object .. _datetime-format: - .. method:: format( ['convensions'] ) + .. method:: format( ['convensions'] ) [TBD] Convert the standard ``datetime`` object presentation into a formatted string. - The formatting convension specifications are the same as in the `strftime `__ library. + The formatting convension specifications are the same as in the `strftime `__ library. [TBD] Additional convension for nanoseconds is `%f` which also allows a modifier to control the output precision of fractional part: `%5f` (see the example below). If no arguments are set for the method, the default convensions are used: `'%FT%T.%f%z'` (see the example below). - :param string convensions: string consisting of zero or more conversion specifications and ordinary characters + :param string convensions: string consisting of zero or more conversion specifications and ordinary characters [TBD] :return: string with the formatted date and time information :rtype: string @@ -251,7 +251,7 @@ datetime_object :param table input: an :ref:`interval object ` or an equivalent table (see **Example #1**) :param string adjust: defines how to round days in a month after an arithmetic operation. - Possible values: ``none``, ``last``, ``excess`` (see **Example #2**). Defaults to ``none``. + Possible values: ``none``, ``last``, ``excess`` (see **Example #2**). Defaults to ``none``. [TBD] :return: datetime_object :rtype: cdata diff --git a/doc/reference/reference_lua/datetime/interval_arithm.rst b/doc/reference/reference_lua/datetime/interval_arithm.rst new file mode 100644 index 0000000000..9cd2a71eec --- /dev/null +++ b/doc/reference/reference_lua/datetime/interval_arithm.rst @@ -0,0 +1,94 @@ +.. _inverval_arithm: + +Inverval arithmetic +=================== + +Since :doc:`2.10.0 `. + +The :doc:`datetime module ` enables creating objects of two types: ``datetime`` and ``interval``. + +If you need to shift the ``datetime`` object values, you can use either the modifier methods, that is, the :ref:`:add ` or :ref:`:sub ` methods, +or apply interval arithmetic using overloaded `+ (__add)` or `- (__sub)` methods. + +``:add``/``:sub`` modify the current object, but ``+``/``+`` create copy of the object as the operation result. + +In the interval operation, each of the interval subcomponents are sequentially calculated starting from the largest (``year``) to the smallest (``nsec``): + +* year -- years +* month -- months +* week -- weeks +* day -- days +* hour -- hours +* min -- minutes +* sec -- seconds +* nsec -- nanoseconds. + +If results of the operation exceed the allowed range for any of the components, an exception is raised. + +The ``datetime`` and ``interval`` objects can participate in arithmetic operations: + +* The sum of two intervals is an interval object, which fields are sum of each particular component of operands. + +* The result of subtraction of two intervals is similar: it's an interval object where each subcomponent is the result of subtraction of particular fields in the original operands. + +* If you add datetime and interval objects, the result is a datetime object. Addition is being performed in a determined order from the largest component (``year``) to the smallest (``nsec``). + +* Subtraction of two datetime objects produce an interval object. Difference of two time values is performed not as difference of the epoch seconds, but as difference of all the subcomponents, that is, years, months, days, hours, minutes, and seconds. + +* An untyped table object can be used in each context where the typed datetime or interval objects are used if left operand is typed object with overloaded operation of ``+`` or ``-``. + +The matrix of the ``addition`` operands eligibility and their result types: + +.. container:: table + + .. list-table:: + :widths: 25 25 25 25 + :header-rows: 1 + + * - + - datetime + - interval + - table + + * - **datetime** + - + - datetime + - datetime + + * - **interval** + - datetime + - interval + - interval + + * - **table** + - + - + - + +The matrix of the ``subtraction`` operands eligibility and their result types: + +.. container:: table + + .. list-table:: + :widths: 25 25 25 25 + :header-rows: 1 + + * - + - datetime + - interval + - table + + * - **datetime** + - interval + - datetime + - datetime + + * - **interval** + - + - interval + - interval + + * - **table** + - + - + - diff --git a/doc/reference/reference_lua/datetime/interval_new.rst b/doc/reference/reference_lua/datetime/interval_new.rst index b114f79e61..533c7698a0 100644 --- a/doc/reference/reference_lua/datetime/interval_new.rst +++ b/doc/reference/reference_lua/datetime/interval_new.rst @@ -13,7 +13,7 @@ datetime.interval.new() :param table input: Table with :ref:`time units and parameters`. For all possible time units, the values are not restricted. If an empty table or no arguments are passed, the ``interval`` object with the default value ``0 seconds`` is created. - :return: :doc: interval object + :return: interval_object :rtype: cdata .. _interval-new-args: diff --git a/doc/reference/reference_lua/datetime/new.rst b/doc/reference/reference_lua/datetime/new.rst index 51f7cdd38e..abc01dd34f 100644 --- a/doc/reference/reference_lua/datetime/new.rst +++ b/doc/reference/reference_lua/datetime/new.rst @@ -18,7 +18,7 @@ datetime.new() .. _datetime-new-args: - **Possible input time units for ``datetime.new()** + **Possible input time units for ``datetime.new()``** .. container:: table From 1cc77db92b5a9b8171056fdbe39734fa39dec957 Mon Sep 17 00:00:00 2001 From: Evgeniy Osintsev Date: Mon, 15 Aug 2022 13:12:54 +0300 Subject: [PATCH 4/5] Correct toctree Part of #2835 --- doc/reference/reference_lua/datetime.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/reference/reference_lua/datetime.rst b/doc/reference/reference_lua/datetime.rst index 5ff64e3011..76f6341c27 100644 --- a/doc/reference/reference_lua/datetime.rst +++ b/doc/reference/reference_lua/datetime.rst @@ -58,3 +58,5 @@ Below is a list of the ``datetime`` module functions and methods. datetime/new datetime/datetime_object datetime/interval_new + datetime/interval_object + datetime/interval_arithm From b5e33f9b5d005a3566ce3f367aff0ab6de61ea44 Mon Sep 17 00:00:00 2001 From: Evgeniy Osintsev Date: Wed, 17 Aug 2022 11:02:31 +0300 Subject: [PATCH 5/5] Correct description after review Part of #2835 --- doc/reference/reference_lua/datetime.rst | 6 ++-- .../datetime/datetime_object.rst | 18 ++++++------ .../datetime/interval_arithm.rst | 29 ++++++++++--------- .../reference_lua/datetime/interval_new.rst | 4 +-- .../datetime/interval_object.rst | 4 +-- doc/reference/reference_lua/datetime/new.rst | 2 +- 6 files changed, 32 insertions(+), 31 deletions(-) diff --git a/doc/reference/reference_lua/datetime.rst b/doc/reference/reference_lua/datetime.rst index 76f6341c27..f34bc6967f 100644 --- a/doc/reference/reference_lua/datetime.rst +++ b/doc/reference/reference_lua/datetime.rst @@ -38,10 +38,10 @@ Below is a list of the ``datetime`` module functions and methods. - Convert an input string with the date and time information into a ``datetime`` object. * - :ref:`add() ` - - Modify an existing datetime object by adding ... [TBD] + - Modify an existing datetime object by adding values of the input arguments. * - :ref:`sub() ` - - Modify an existing datetime object by subtracting ... [TBD] + - Modify an existing datetime object by subtracting values of the input arguments. * - :doc:`./datetime/interval_new` - Create an ``interval`` object from a table of time units. @@ -50,7 +50,7 @@ Below is a list of the ``datetime`` module functions and methods. - Convert the information from an ``interval`` object into the table format. * - :doc:`./datetime/interval_arithm` - - ... [TBD] + - Arithmetic operations with datetime and interval objects. .. toctree:: :hidden: diff --git a/doc/reference/reference_lua/datetime/datetime_object.rst b/doc/reference/reference_lua/datetime/datetime_object.rst index b96f955434..1b82c4829d 100644 --- a/doc/reference/reference_lua/datetime/datetime_object.rst +++ b/doc/reference/reference_lua/datetime/datetime_object.rst @@ -92,14 +92,14 @@ datetime_object .. _datetime-format: - .. method:: format( ['convensions'] ) [TBD] + .. method:: format( ['input_string'] ) Convert the standard ``datetime`` object presentation into a formatted string. - The formatting convension specifications are the same as in the `strftime `__ library. [TBD] - Additional convension for nanoseconds is `%f` which also allows a modifier to control the output precision of fractional part: `%5f` (see the example below). - If no arguments are set for the method, the default convensions are used: `'%FT%T.%f%z'` (see the example below). + The conversion specifications are the same as in the `strftime `__ library. + Additional specification for nanoseconds is `%f` which also allows a modifier to control the output precision of fractional part: `%5f` (see the example below). + If no arguments are set for the method, the default conversions are used: `'%FT%T.%f%z'` (see the example below). - :param string convensions: string consisting of zero or more conversion specifications and ordinary characters [TBD] + :param string input_string: string consisting of zero or more conversion specifications and ordinary characters :return: string with the formatted date and time information :rtype: string @@ -247,11 +247,11 @@ datetime_object .. method:: add( input[, { adjust } ] ) - Modify an existing datetime object by adding values of the input argument. [TBD] + Modify an existing datetime object by adding values of the input argument. :param table input: an :ref:`interval object ` or an equivalent table (see **Example #1**) :param string adjust: defines how to round days in a month after an arithmetic operation. - Possible values: ``none``, ``last``, ``excess`` (see **Example #2**). Defaults to ``none``. [TBD] + Possible values: ``none``, ``last``, ``excess`` (see **Example #2**). Defaults to ``none``. :return: datetime_object :rtype: cdata @@ -338,12 +338,12 @@ datetime_object .. method:: sub( { input[, adjust ] } ) - Modify an existing datetime object by subtracting values of the input argument. [TBD] + Modify an existing datetime object by subtracting values of the input argument. :param table input: an :ref:`interval object ` or an equivalent table (see **Example**) :param string adjust: defines how to round days in a month after an arithmetic operation. Possible values: ``none``, ``last``, ``excess``. Defaults to ``none``. - The logic is similar to the one of the ``:add()`` method -- see :ref:`Example #2 `. [TBD] + The logic is similar to the one of the ``:add()`` method -- see :ref:`Example #2 `. :return: datetime_object :rtype: cdata diff --git a/doc/reference/reference_lua/datetime/interval_arithm.rst b/doc/reference/reference_lua/datetime/interval_arithm.rst index 9cd2a71eec..b2419a4741 100644 --- a/doc/reference/reference_lua/datetime/interval_arithm.rst +++ b/doc/reference/reference_lua/datetime/interval_arithm.rst @@ -1,6 +1,6 @@ -.. _inverval_arithm: +.. _interval_arithm: -Inverval arithmetic +Interval arithmetic =================== Since :doc:`2.10.0 `. @@ -10,18 +10,18 @@ The :doc:`datetime module ` enables creating If you need to shift the ``datetime`` object values, you can use either the modifier methods, that is, the :ref:`:add ` or :ref:`:sub ` methods, or apply interval arithmetic using overloaded `+ (__add)` or `- (__sub)` methods. -``:add``/``:sub`` modify the current object, but ``+``/``+`` create copy of the object as the operation result. +``:add``/``:sub`` modify the current object, but ``+``/``-`` create copy of the object as the operation result. In the interval operation, each of the interval subcomponents are sequentially calculated starting from the largest (``year``) to the smallest (``nsec``): -* year -- years -* month -- months -* week -- weeks -* day -- days -* hour -- hours -* min -- minutes -* sec -- seconds -* nsec -- nanoseconds. +* ``year`` -- years +* ``month`` -- months +* ``week`` -- weeks +* ``day`` -- days +* ``hour`` -- hours +* ``min`` -- minutes +* ``sec`` -- seconds +* ``nsec`` -- nanoseconds. If results of the operation exceed the allowed range for any of the components, an exception is raised. @@ -33,7 +33,8 @@ The ``datetime`` and ``interval`` objects can participate in arithmetic operatio * If you add datetime and interval objects, the result is a datetime object. Addition is being performed in a determined order from the largest component (``year``) to the smallest (``nsec``). -* Subtraction of two datetime objects produce an interval object. Difference of two time values is performed not as difference of the epoch seconds, but as difference of all the subcomponents, that is, years, months, days, hours, minutes, and seconds. +* Subtraction of two datetime objects produce an interval object. Difference of two time values is performed not as difference of the epoch seconds, + but as difference of all the subcomponents, that is, years, months, days, hours, minutes, and seconds. * An untyped table object can be used in each context where the typed datetime or interval objects are used if left operand is typed object with overloaded operation of ``+`` or ``-``. @@ -45,7 +46,7 @@ The matrix of the ``addition`` operands eligibility and their result types: :widths: 25 25 25 25 :header-rows: 1 - * - + * - - datetime - interval - table @@ -73,7 +74,7 @@ The matrix of the ``subtraction`` operands eligibility and their result types: :widths: 25 25 25 25 :header-rows: 1 - * - + * - - datetime - interval - table diff --git a/doc/reference/reference_lua/datetime/interval_new.rst b/doc/reference/reference_lua/datetime/interval_new.rst index 533c7698a0..fab53e5ae9 100644 --- a/doc/reference/reference_lua/datetime/interval_new.rst +++ b/doc/reference/reference_lua/datetime/interval_new.rst @@ -68,12 +68,12 @@ datetime.interval.new() - 0 * - year - - Year. ... [TBD year range and huge year number support] + - Year - number - 0 * - adjust - - ... [TBD] + - Defines how to round days in a month after an arithmetic operation. - string - 'none' diff --git a/doc/reference/reference_lua/datetime/interval_object.rst b/doc/reference/reference_lua/datetime/interval_object.rst index d278bb399f..69de2835cb 100644 --- a/doc/reference/reference_lua/datetime/interval_object.rst +++ b/doc/reference/reference_lua/datetime/interval_object.rst @@ -7,7 +7,7 @@ inverval_object Since :doc:`2.10.0 `. - .. _inverval-totable: + .. _interval-totable: .. method:: totable() @@ -48,7 +48,7 @@ inverval_object - Week number * - adjust - - ... [TBD] + - Defines how to round days in a month after an arithmetic operation. :return: table with the date and time parameters :rtype: table diff --git a/doc/reference/reference_lua/datetime/new.rst b/doc/reference/reference_lua/datetime/new.rst index abc01dd34f..4171ad141f 100644 --- a/doc/reference/reference_lua/datetime/new.rst +++ b/doc/reference/reference_lua/datetime/new.rst @@ -63,7 +63,7 @@ datetime.new() - 1 * - year - - Year. ... [TBD year range and huge year number support] + - Year. - number - 1970