1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Rule move / subfolder: Added week number placeholder

This commit is contained in:
M66B 2022-09-17 07:26:33 +02:00
parent 86b4f4ae80
commit e25c8a6ed1
2 changed files with 3 additions and 0 deletions

1
FAQ.md
View file

@ -2592,6 +2592,7 @@ This will be more reliable than forwarding because forwarded messages might be c
A *move* action can optionally create subfolders (since version 1.1966) to move messages to, for which you can use the following placeholders:
```
$week$
$month$
$year$
$domain$

View file

@ -623,9 +623,11 @@ public class EntityRule {
Calendar calendar = Calendar.getInstance();
String year = String.format(Locale.ROOT, "%04d", calendar.get(Calendar.YEAR));
String month = String.format(Locale.ROOT, "%02d", calendar.get(Calendar.MONTH) + 1);
String week = String.format(Locale.ROOT, "%02d", calendar.get(Calendar.WEEK_OF_YEAR));
create = create.replace("$year$", year);
create = create.replace("$month$", month);
create = create.replace("$week$", week);
String domain = null;
if (message.from != null &&