We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there a negative or inverse of add_time?
add_time
The text was updated successfully, but these errors were encountered:
There's no function for it in this library, but you could just use negative numbers:
% show current time > calendar:local_time(). {{2017,7,7},{15,5,42}} % subtract 2 hours, 3 minutes, 4 seconds > iso8601:add_time(calendar:local_time(), -2, -3, -4). {{2017,7,7},{13,2,38}}
You could even define your own function for convenience:
Subtract = fun(Datetime, H, M, S) -> iso8601:add_time(Datetime, -H, -M, -S) end. % show current time > calendar:local_time(). {{2017,7,7},{15,10,39}} % subtract 2 hours, 3 minutes, 10 seconds > Subtract(calendar:local_time(), 2, 3, 10). {{2017,7,7},{13,7,29}}
Sorry, something went wrong.
We can definitely add this.
No branches or pull requests
Is there a negative or inverse of
add_time
?The text was updated successfully, but these errors were encountered: