mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
ls: move recent time threshold comment
This value was moved to a dedicated recent_time_threshold field in
c599363242
but its corresponding
explanation comment was not included.
This commit is contained in:
parent
4f3d7dad42
commit
573e5d047a
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