commit c9c5b9f139ccbf5372d1568827fbb50bec7239bb from: Sergey Bronnikov via: Sergey Kaplun date: Mon Aug 05 18:08:11 2024 UTC datetime: fix typos The patch fixes a number of typos in datetime source code. NO_CHANGELOG=codehealth NO_DOC=codehealth NO_TEST=codehealth commit - 9ac56a1222e916951010091fbdbfc497f4a4971d commit + c9c5b9f139ccbf5372d1568827fbb50bec7239bb blob - fcf1c7aea292859755c9608d214b9d8d2c02beed blob + af831e0a25899d62405ecd6cbfc8e9ef3af7dbf8 --- src/lib/core/datetime.h +++ src/lib/core/datetime.h @@ -94,7 +94,7 @@ struct datetime { }; /** - * To be able to perform arithmetics on time intervals and receive + * To be able to perform arithmetic on time intervals and receive * deterministic results, we keep each component (i.e. years, months, weeks, * days, etc) separately from seconds. * We add/subtract interval components separately, and rebase upon resultant @@ -216,9 +216,9 @@ datetime_parse_full(struct datetime *date, const char * @param str input text in relaxed ISO-8601 format (0-terminated) * @param len length of str buffer * @param[out] tzoffset return timezone offset if recognized - * @param[out] tzindex return timzeon index if recognized + * @param[out] tzindex return timezone index if recognized * @retval Upon successful completion returns length of accepted - * substring. Returns 0 if text is not recognizable as timzeone. + * substring. Returns 0 if text is not recognizable as timezone. * Returns negative value is there is unaccepted timezone. * @sa datetime_parse_full() */ blob - 633349e3538cb9da976caa6d87b0568c5f1f9326 blob + be58a9a2cfed894daad18e49beb981a39e9770a2 --- src/lua/datetime.lua +++ src/lua/datetime.lua @@ -7,7 +7,7 @@ local tz = require('timezones') values, where `dt` is a number of dates since Rata Die date (0001-01-01). `c-dt` uses 32-bit integer number to store `dt` values, so range of - suported dates is limited to dates from -5879610-06-22 (INT32_MIN) to + supported dates is limited to dates from -5879610-06-22 (INT32_MIN) to +5879611-07-11 (INT32_MAX). For better compactness of our typical data in MessagePack stream we shift @@ -253,7 +253,7 @@ local function check_str_or_nil(s, message) end -- range may be of a form of pair {from, to} or --- tuple {fom, to, -1 in extra} +-- tuple {from, to, -1 in extra} -- -1 is a special value (so far) used for days only local function check_range(v, from, to, txt, extra) if type(v) ~= 'number' then