Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --delta option #24

Open
hollasch opened this issue Feb 22, 2018 · 5 comments
Open

Add --delta option #24

hollasch opened this issue Feb 22, 2018 · 5 comments

Comments

@hollasch
Copy link
Owner

To enter a single-valued time delta, in ISO 8601 format. Note that this precludes any other time values on the command line.

@hollasch hollasch added this to the v2.0.0 milestone Feb 22, 2018
@hollasch
Copy link
Owner Author

Needs to handle nominal vs. tropical years.

@hollasch
Copy link
Owner Author

hollasch commented Feb 26, 2018

Maybe something like 23t114d13h17m88s or 23t 114d 13:17:08.

@hollasch hollasch removed this from the v2.0.0 milestone Feb 26, 2018
@hollasch
Copy link
Owner Author

The --delta option should follow the ISO-8601 duration format. The leading P should be optional (implied through use of the --delta option). Based on my understanding, the date components suggest simply adding/subtracting the delta field-by-field to the current date-time.

In addition, the --delta option should allow an optional +/- sign either immediately before or immediately after the leading P character.

@hollasch
Copy link
Owner Author

hollasch commented Nov 26, 2018

A fixed time plus a delta time yields a fixed time. For example, this would allow you to print the time one tropical year from some given date. In addition, a single delta time yields a delta time. This all suggests that the one-versus-two time specifications logic would need to change in several cases.

fixed → fixed
delta → delta
delta+ → delta
fixed, fixed → delta
fixed, fixed, delta+→ delta

@hollasch
Copy link
Owner Author

hollasch commented Nov 4, 2019

Note: if --delta is provided in conjunction with an absolute time (--now, --access, --creation, --modification, --time), then it is applied to the given time to yield an absoute time. This provides a way to find the time 70 days from now, for example, or 43 seconds before a file's modification time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant