Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 650c407

Browse files
author
livecodesam
committed
[Bugfix-19495] Describe potential use of out-of-range values in dateItems
1 parent 84b9176 commit 650c407

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/dictionary/keyword/dateItems.lcdoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ The <dateItems> does not change depending on the user's settings, so you
4040
can use it (or the <seconds> format) to store a date and time in an
4141
invariant form that won't change.
4242

43+
>*Note:* A list in <dateItems> format can have values beyond the expected
44+
range for any given item (e.g. a day of the month of less than 1 or greater
45+
than the number of days in that month) without causing issues when converting
46+
it again later, outputting a date adjusted for such an irregularity. For
47+
example, the date 4 weeks from today can be determined by adding 28 to the
48+
third item (i.e. the day of the month) and then re-converting.
49+
50+
put the date into foo -- 9/19/19, for example
51+
convert foo to dateItems -- 2019,9,19,0,0,0,5
52+
add 28 to the item 3 of foo -- 2019,9,47,0,0,0,5
53+
convert foo to date -- 10/17/19
54+
4355
References: convert (command), date (function),
4456
seconds (function), time (function), command (glossary),
4557
keyword (glossary)

docs/notes/bugfix-19495.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Explained a feature in the dateItems entry where out-of-range values can be used effectively.

0 commit comments

Comments
 (0)