@datum-cloud/activity-ui 0.7.1-dev.0ada97a → 0.7.1-dev.1ce6c58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -712,6 +712,19 @@ function toDate(argument, context) {
712
712
  * @description
713
713
  * Add the specified number of days to the given date.
714
714
  *
715
+ * **You don't need date-fns\***:
716
+ *
717
+ * Temporal has a built-in `add` method on all its classes:
718
+ *
719
+ * - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
720
+ * - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
721
+ * - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
722
+ * - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
723
+ * - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
724
+ * - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
725
+ *
726
+ * \* **Not really**, see: https://date-fns.org/you-dont-need-date-fns
727
+ *
715
728
  * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
716
729
  * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
717
730
  *
@@ -725,6 +738,12 @@ function toDate(argument, context) {
725
738
  * // Add 10 days to 1 September 2014:
726
739
  * const result = addDays(new Date(2014, 8, 1), 10)
727
740
  * //=> Thu Sep 11 2014 00:00:00
741
+ *
742
+ * @example
743
+ * // Using Temporal:
744
+ * // Add 10 days to 1 September 2014:
745
+ * Temporal.PlainDate.from("2014-09-01").add({ days: 10 }).toString();
746
+ * //=> "2014-09-11"
728
747
  */
729
748
  function addDays(date, amount, options) {
730
749
  const _date = toDate(date, options?.in);