data tree FEATURE lyd_has_when function
diff --git a/src/tree_data.h b/src/tree_data.h
index 4b3118d..0027364 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -88,6 +88,7 @@
  * - ::lyd_child_no_keys()
  * - ::lyd_parent()
  * - ::lyd_owner_module()
+ * - ::lyd_has_when()
  * - ::lyd_find_xpath()
  * - ::lyd_find_sibling_val()
  * - ::lyd_find_sibling_first()
@@ -771,6 +772,18 @@
 const struct lys_module *lyd_owner_module(const struct lyd_node *node);
 
 /**
+ * @brief Check whether this data node existence depends on any when conditions. This node's schema node and
+ * any direct parent choice and case schema nodes are also examined for when conditions.
+ *
+ * Be careful, this function is not recursive and checks only conditions that apply to this node directly.
+ * Meaning if there are any conditions associated with any parent of @p node, they are not returned.
+ *
+ * @param[in] node Data node to examine.
+ * @return When condition associated with the node, NULL if there is none.
+ */
+const struct lysc_when *lyd_has_when(const struct lyd_node *node);
+
+/**
  * @brief Check whether a node value equals to its default one.
  *
  * @param[in] node Term node to test.