[BusyBox] sugestion: date -d extension
walter harms
wharms at bfs.de
Sun Jun 5 14:44:38 UTC 2005
Hi Gyorgy,
i will do everything not to need to patch bb everytime :)
of cause is not the problem to add %Y-%m-%d to the list of conversions
the meta question is: what else is missing ?
Epoch to date (i need it often) comes to mind and other ppl will find
other combinations like %Y-%d-%m ,....
instead of adding a new pattern everytime there is a problem evrything
would be fine if you can provide the conversion pattern by yourself.
people in need for date conversions know what in-pattern the have and
what out-pattern then want. lets help them (and me) and get rid of
guessing the right pattern as gnudate does.
If this (-D pattern) will become an established way post programmers
will choose it because its simple. busysbox can drop the -d as it is now
reducing code size (in case it matters).
btw: i think that is even a nice extension for gnudate.
re,
walter
Gyorgy Farkas wrote:
> walter harms <wharms at bfs.de> wrote:
>
>
>>i do not say "you can not do that" with busybox. The point
>
> is that
>
>>gnudate (-d option) is more powerfull. adding a 'hint'
>
> command line
>
>>parameter would increase power of "bbdate -d" without
>
> adding a whole
>
>>bunch of code.
>>I can write the code and would donate it but it would
>
> extend bb beyond
>
>>date. the question is: do you (the ML) want that ?
>>(short: limited compartibility vs feature)
>
>
>
> Hi Walter,
>
> OK, I agree with you, GNU 'date -d' is more powerful than BB
> 'date -d'
> (and any BusyBox improvement can be useful ;).
>
> Although I don't fully understand why just the
> 1970.01.01-00:00:00 format was choosen by the author
> instead of the
> 1970-01-01 00:00:00 pure ISO 8601 representation - but this
> YYYY.MM.DD-hh:mm:ss BB input string is convenient for me
> because very easy to convert from an ISO string,
> and YYYY.MM.DD. is a usual notation in Hungary.
>
> And most probably I don't fully understand either your
> suggestion.
> What would we do more easily after your modification?
> Would be an incidentally needed date conversion script
> simpler on BB?
>
> Could you give me a few realistic 'usage' examples - please
> if you have a little spare time and some patience.
>
More information about the busybox
mailing list