You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Motivation and Context
This change will allow easy sorting or comparing anything that contains
a DateTime. My example is wanting to sort a list of S3 objects by last
modified.
This PR fixes#2406
## Description
It's a pretty small PR, it implements the `Ord` trait for `DateTime` by
comparing the `seconds` property of `self` and `other`, if they are
equal it compares the `subsec_nanos` properties instead.
The `PartialOrd` trait is implemented by calling the `Ord` trait.
## Testing
I added a unit test that compares a number of `DateTime` values with
different combinations of positive/zero/negative
`seconds`/`subsec_nanos`.
## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
0 commit comments