How about a way to set color if a date is less or more then x days.
Then you can show files that are from today in a different color
It is possible.
// First we need to remove all existing rules. DO NOT FORGET TO DO THIS.
FileColoringClear();
// variable to store Rule in
@var $rule = 0;
// Add Rule - If date is within 10 days from now
@var $now = GetTime();
@var $then = $now - 60*60*24*10;
@var $now_str = FormatDate( "yyyy-MM-dd " , $now ) + FormatTime("HH:mm:ss", $now);
@var $then_str = FormatDate( "yyyy-MM-dd 00:00:00" , $then );
$rule = FileColoringAddRule(0, "Date" , "Before", $now_str );
$rule = FileColoringAddRule($rule, "Date" , "After", $then_str );
FileColoringSetColor( $rule , "#444433" , "#00FF00" );
// Revalidate all file coloring.
FileColoringRefresh();
But there are 2 moments.
1. GetTime() always returns uncorrected time. E.g. if i have GMT+04, at 15:00 GetTime() will return 11:00
2. Last modified datetime is used when checking files.
Well Yes, you can do it with script. But configuring using script is only a workaround for now UNTIL the UI has been added.
(Will probably keep the ability to configure using script. Because it make it more powerful and you can switch to new color setups fast.
But it should not be require to do scripting to configure the rules in the future. )
Btw "GetTime(1);" will return UTC time.. and there is also "TimeLocal2UTC(..)" that convert Local > UTC time. and TimeUTC2Local that convert the other way
But someway to set a rule for Today, or if a file is 2 days old or older then 5 weeks might be useful.
Maybe something like.
FileColoringAddRule(0, "Date" , "Is", "today"); // from today.
FileColoringAddRule(0, "Date" , "Is", "thisweek"); // if file is from current week
FileColoringAddRule(0, "Date" , "LessThan", "5d"); // Less than 5 days old
FileColoringAddRule(0, "Date" , "MoreThan", "5w"); // more than 5 weeks old