+{"name": "DateTime", "version": "3.1.1", "keywords": [{"name": "Add Time To Date", "args": ["date", "time", "result_format=timestamp", "exclude_millis=False", "date_format=None"], "doc": "Adds time to date and returns the resulting date.\n\nArguments:\n- ``date:`` Date to add time to in one of the supported\n `date formats`.\n- ``time:`` Time that is added in one of the supported\n `time formats`.\n- ``result_format:`` Format of the returned date.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n- ``date_format:`` Possible `custom timestamp` format of ``date``.\n\nExamples:\n| ${date} = | Add Time To Date | 2014-05-28 12:05:03.111 | 7 days |\n| Should Be Equal | ${date} | 2014-06-04 12:05:03.111 | |\n| ${date} = | Add Time To Date | 2014-05-28 12:05:03.111 | 01:02:03:004 |\n| Should Be Equal | ${date} | 2014-05-28 13:07:06.115 |"}, {"name": "Add Time To Time", "args": ["time1", "time2", "result_format=number", "exclude_millis=False"], "doc": "Adds time to another time and returns the resulting time.\n\nArguments:\n- ``time1:`` First time in one of the supported `time formats`.\n- ``time2:`` Second time in one of the supported `time formats`.\n- ``result_format:`` Format of the returned time.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n\nExamples:\n| ${time} = | Add Time To Time | 1 minute | 42 |\n| Should Be Equal | ${time} | ${102} |\n| ${time} = | Add Time To Time | 3 hours 5 minutes | 01:02:03 | timer | exclude_millis=yes |\n| Should Be Equal | ${time} | 04:07:03 |"}, {"name": "Convert Date", "args": ["date", "result_format=timestamp", "exclude_millis=False", "date_format=None"], "doc": "Converts between supported `date formats`.\n\nArguments:\n- ``date:`` Date in one of the supported `date formats`.\n- ``result_format:`` Format of the returned date.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n- ``date_format:`` Specifies possible `custom timestamp` format.\n\nExamples:\n| ${date} = | Convert Date | 20140528 12:05:03.111 |\n| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 |\n| ${date} = | Convert Date | ${date} | epoch |\n| Should Be Equal | ${date} | ${1401267903.111} |\n| ${date} = | Convert Date | 5.28.2014 12:05 | exclude_millis=yes | date_format=%m.%d.%Y %H:%M |\n| Should Be Equal | ${date} | 2014-05-28 12:05:00 |"}, {"name": "Convert Time", "args": ["time", "result_format=number", "exclude_millis=False"], "doc": "Converts between supported `time formats`.\n\nArguments:\n- ``time:`` Time in one of the supported `time formats`.\n- ``result_format:`` Format of the returned time.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n\nExamples:\n| ${time} = | Convert Time | 10 seconds |\n| Should Be Equal | ${time} | ${10} |\n| ${time} = | Convert Time | 1:00:01 | verbose |\n| Should Be Equal | ${time} | 1 hour 1 second |\n| ${time} = | Convert Time | ${3661.5} | timer | exclude_milles=yes |\n| Should Be Equal | ${time} | 01:01:02 |"}, {"name": "Get Current Date", "args": ["time_zone=local", "increment=0", "result_format=timestamp", "exclude_millis=False"], "doc": "Returns current local or UTC time with an optional increment.\n\nArguments:\n- ``time_zone:`` Get the current time on this time zone. Currently only\n ``local`` (default) and ``UTC`` are supported.\n- ``increment:`` Optional time increment to add to the returned date in\n one of the supported `time formats`. Can be negative.\n- ``result_format:`` Format of the returned date (see `date formats`).\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n\nExamples:\n| ${date} = | Get Current Date |\n| Should Be Equal | ${date} | 2014-06-12 20:00:58.946 |\n| ${date} = | Get Current Date | UTC |\n| Should Be Equal | ${date} | 2014-06-12 17:00:58.946 |\n| ${date} = | Get Current Date | increment=02:30:00 |\n| Should Be Equal | ${date} | 2014-06-12 22:30:58.946 |\n| ${date} = | Get Current Date | UTC | - 5 hours |\n| Should Be Equal | ${date} | 2014-06-12 12:00:58.946 |\n| ${date} = | Get Current Date | result_format=datetime |\n| Should Be Equal | ${date.year} | ${2014} |\n| Should Be Equal | ${date.month} | ${6} |"}, {"name": "Subtract Date From Date", "args": ["date1", "date2", "result_format=number", "exclude_millis=False", "date1_format=None", "date2_format=None"], "doc": "Subtracts date from another date and returns time between.\n\nArguments:\n- ``date1:`` Date to subtract another date from in one of the\n supported `date formats`.\n- ``date2:`` Date that is subtracted in one of the supported\n `date formats`.\n- ``result_format:`` Format of the returned time (see `time formats`).\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n- ``date1_format:`` Possible `custom timestamp` format of ``date1``.\n- ``date2_format:`` Possible `custom timestamp` format of ``date2``.\n\n Examples:\n| ${time} = | Subtract Date From Date | 2014-05-28 12:05:52 | 2014-05-28 12:05:10 |\n| Should Be Equal | ${time} | ${42} |\n| ${time} = | Subtract Date From Date | 2014-05-28 12:05:52 | 2014-05-27 12:05:10 | verbose |\n| Should Be Equal | ${time} | 1 day 42 seconds |"}, {"name": "Subtract Time From Date", "args": ["date", "time", "result_format=timestamp", "exclude_millis=False", "date_format=None"], "doc": "Subtracts time from date and returns the resulting date.\n\nArguments:\n- ``date:`` Date to subtract time from in one of the supported\n `date formats`.\n- ``time:`` Time that is subtracted in one of the supported\n `time formats`.\n- ``result_format:`` Format of the returned date.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n- ``date_format:`` Possible `custom timestamp` format of ``date``.\n\nExamples:\n| ${date} = | Subtract Time From Date | 2014-06-04 12:05:03.111 | 7 days |\n| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 |\n| ${date} = | Subtract Time From Date | 2014-05-28 13:07:06.115 | 01:02:03:004 |\n| Should Be Equal | ${date} | 2014-05-28 12:05:03.111 |"}, {"name": "Subtract Time From Time", "args": ["time1", "time2", "result_format=number", "exclude_millis=False"], "doc": "Subtracts time from another time and returns the resulting time.\n\nArguments:\n- ``time1:`` Time to subtract another time from in one of\n the supported `time formats`.\n- ``time2:`` Time to subtract in one of the supported `time formats`.\n- ``result_format:`` Format of the returned time.\n- ``exclude_millis:`` When set to any true value, rounds and drops\n milliseconds as explained in `millisecond handling`.\n\nExamples:\n| ${time} = | Subtract Time From Time | 00:02:30 | 100 |\n| Should Be Equal | ${time} | ${50} |\n| ${time} = | Subtract Time From Time | ${time} | 1 minute | compact |\n| Should Be Equal | ${time} | - 10s |"}]}
0 commit comments