mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Merge pull request #8214 from deadmeu/move-comment
ls: move recent time threshold comment
This commit is contained in:
commit
407d97c68f
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,6 @@ enum TimeStyle {
|
|||
|
||||
/// Whether the given date is considered recent (i.e., in the last 6 months).
|
||||
fn is_recent(time: Timestamp, state: &mut ListState) -> bool {
|
||||
// According to GNU a Gregorian year has 365.2425 * 24 * 60 * 60 == 31556952 seconds on the average.
|
||||
time > state.recent_time_threshold
|
||||
}
|
||||
|
||||
|
@ -2080,6 +2079,7 @@ pub fn list(locs: Vec<&Path>, config: &Config) -> UResult<()> {
|
|||
uid_cache: HashMap::new(),
|
||||
#[cfg(unix)]
|
||||
gid_cache: HashMap::new(),
|
||||
// According to GNU a Gregorian year has 365.2425 * 24 * 60 * 60 == 31556952 seconds on the average.
|
||||
recent_time_threshold: Timestamp::now() - Duration::new(31_556_952 / 2, 0),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue