| Summary: | date -v31d -v08m -v2000y | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Dietmar Tanke <dtanke> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.1-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Dietmar Tanke
2000-09-04 21:10:00 UTC
On Mon, 4 Sep 2000, Dietmar Tanke wrote:
> >Description:
> Date adjustment using the -v option seems not work for any date with
> the 31th day of a month. Two examples. First one with a good result
> and the second leads to an unexpected error. Is it a bug?
>
> dtanke$ date -v30d -v08m -v2000y
> Wed Aug 30 21:27:24 CEST 2000
The order of the "-v"s are important.
bash-2.03$ date -v8m -v31d -v2000y
Thu Aug 31 22:45:03 CEST 2000
Try it next month and it'll work no matter what the order. :-)
-Paul.
State Changed From-To: open->closed As Paul says, the -v options are processed in the order given (as mentioned in the man page). Doing things most-significant first will make things work for you. |