From: Markus Triska Date: Thu, 16 Jul 2020 21:33:52 +0000 (+0200) Subject: ENHANCED: Reorder fields in time stamps so that (@<)/2 is meaningful. X-Git-Tag: v0.8.127~11^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=8668aee7fdff914a58a3a356c24c35911736aa66;p=scryer-prolog.git ENHANCED: Reorder fields in time stamps so that (@<)/2 is meaningful. --- diff --git a/src/lib/files.pl b/src/lib/files.pl index 481ed08d..adaa1e94 100644 --- a/src/lib/files.pl +++ b/src/lib/files.pl @@ -125,6 +125,8 @@ path_canonical(Ps, Cs) :- /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T is the modification time of File. T is a time stamp, suitable for use in format_time//2 in library(time). + + For two time stamps A and B, if A precedes B, then A @< B holds. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ file_modification_time(File, T) :- diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index 6c8ee329..9e969c7b 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -5731,7 +5731,7 @@ impl MachineState { let datetime: DateTime = system_time.into(); let mut fstr = "[".to_string(); - let specifiers = vec!["d","m","Y","y","H","M","S","b","B","a","A","w","u","U","W","j","D","x","v"]; + let specifiers = vec!["Y","m","d","H","M","S","y","b","B","a","A","w","u","U","W","j","D","x","v"]; for spec in specifiers { fstr.push_str(&format!("'{}'=\"%{}\", ", spec, spec).to_string()); }