Commits

Sebastian Freundt committed 8bbf6d1

minor, provide api function dt_set_default()

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>

Comments (0)

Files changed (2)

 # pragma GCC diagnostic warning "-Wcast-qual"
 #endif	/* __INTEL_COMPILER */
 
+DEFUN void
+dt_set_default(struct dt_dt_s dt)
+{
+	(void)dflt_tm(&dt);
+	return;
+}
+
 #endif	/* INCLUDED_date_core_c_ */
 /* dt-core.c ends here */
  * Convert a dt_dt_s to an epoch difference, based on the GPS epoch. */
 extern dt_ssexy_t dt_to_gps_epoch(struct dt_dt_s);
 
+/**
+ * Set specific fallback date/time to use when input is underspecified.
+ * Internally, when no default is set and input is underspecified  the
+ * value of `dt_datetime()' (i.e. now) is used to fill fields up. */
+DECLF void dt_set_default(struct dt_dt_s);
+
 
 /* some useful gimmicks, sort of */
 static inline __attribute__((pure, const)) struct dt_dt_s
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.