summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-06-04 19:59:49 +0200
committerDenys Vlasenko2010-06-04 19:59:49 +0200
commite4070cb0d7586037c6fcf0f0f00d8d5b97f649d3 (patch)
treeabb5ef8065937f596c1e1e1249dc745c1076465b /coreutils/date.c
parent6db13732954b23bd0f6f55c5b3c3941f0547141c (diff)
downloadbusybox-e4070cb0d7586037c6fcf0f0f00d8d5b97f649d3.zip
busybox-e4070cb0d7586037c6fcf0f0f00d8d5b97f649d3.tar.gz
partially migrate coreutils to Config.src and Kbuild.src
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index c1390be..2720a35 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -51,6 +51,47 @@
* and does not support -Ins
* -D FMT is a bbox extension for _input_ conversion of -d DATE
*/
+
+//kbuild:lib-$(CONFIG_DATE) += date.o
+
+//config:config DATE
+//config: bool "date"
+//config: default n
+//config: help
+//config: date is used to set the system date or display the
+//config: current time in the given format.
+//config:
+//config:config FEATURE_DATE_ISOFMT
+//config: bool "Enable ISO date format output (-I)"
+//config: default y
+//config: depends on DATE
+//config: help
+//config: Enable option (-I) to output an ISO-8601 compliant
+//config: date/time string.
+//config:
+//config:config FEATURE_DATE_NANO
+//config: bool "Support %[num]N nanosecond format specifier"
+//config: default y
+//config: depends on DATE
+//config: help
+//config: Support %[num]N format specifier. Adds ~250 bytes of code.
+//config:
+//config:config FEATURE_DATE_COMPAT
+//config: bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
+//config: default y
+//config: depends on DATE
+//config: help
+//config: System time can be set by 'date -s DATE' and simply 'date DATE',
+//config: but formats of DATE string are different. 'date DATE' accepts
+//config: a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
+//config: unnatural placement of year between minutes and seconds.
+//config: date -s (and other commands like touch -d) use more sensible
+//config: formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
+//config:
+//config: With this option off, 'date DATE' is 'date -s DATE' support
+//config: the same format. With it on, 'date DATE' additionally supports
+//config: MMDDhhmm[[YY]YY][.ss] format.
+
#include "libbb.h"
enum {