Skip to content

Commit 1a64471

Browse files
fixed not correctly lined up dates
1 parent ab4ea7e commit 1a64471

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Files.App/Services/DateTimeFormatter/AbstractDateTimeFormatter.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,34 @@ public ITimeSpanLabel ToTimeSpanLabel(DateTimeOffset offset, GroupByDateUnit uni
2828
return 0 switch
2929
{
3030
_ when now.Date < time.Date
31-
=> new Label("Future".GetLocalizedResource(), "\uED28", 1000006),
31+
=> new Label("Future".GetLocalizedResource(), "\uED28", 1000000006),
3232
_ when now.Date == time.Date
33-
=> new Label("Today".GetLocalizedResource(), "\uE8D1", 1000005),
33+
=> new Label("Today".GetLocalizedResource(), "\uE8D1", 1000000005),
3434
_ when now.AddDays(-1).Date == time.Date
35-
=> new Label("Yesterday".GetLocalizedResource(), "\uE8BF", 1000004),
35+
=> new Label("Yesterday".GetLocalizedResource(), "\uE8BF", 1000000004),
3636

3737
// Group by day
3838
_ when unit == GroupByDateUnit.Day
39-
=> new Label(ToString(time, "D"), "\uE8BF", time.Year * 100 + time.Month * 10 + time.Day),
39+
=> new Label(ToString(time, "D"), "\uE8BF", time.Year * 10000 + time.Month * 100 + time.Day),
4040

4141
_ when diff.Days <= 7 && GetWeekOfYear(now) == GetWeekOfYear(time)
42-
=> new Label("EarlierThisWeek".GetLocalizedResource(), "\uE8C0", 1000003),
42+
=> new Label("EarlierThisWeek".GetLocalizedResource(), "\uE8C0", 1000000003),
4343
_ when diff.Days <= 14 && GetWeekOfYear(now.AddDays(-7)) == GetWeekOfYear(time)
44-
=> new Label("LastWeek".GetLocalizedResource(), "\uE8C0", 1000002),
44+
=> new Label("LastWeek".GetLocalizedResource(), "\uE8C0", 1000000002),
4545
_ when now.Year == time.Year && now.Month == time.Month
46-
=> new Label("EarlierThisMonth".GetLocalizedResource(), "\uE787", 1000001),
46+
=> new Label("EarlierThisMonth".GetLocalizedResource(), "\uE787", 1000000001),
4747
_ when now.AddMonths(-1).Year == time.Year && now.AddMonths(-1).Month == time.Month
48-
=> new Label("LastMonth".GetLocalizedResource(), "\uE787", 1000000),
48+
=> new Label("LastMonth".GetLocalizedResource(), "\uE787", 1000000000),
4949

5050
// Group by month
5151
_ when unit == GroupByDateUnit.Month
52-
=> new Label(ToString(time, "Y"), "\uE787", time.Year * 100 + time.Month),
52+
=> new Label(ToString(time, "Y"), "\uE787", time.Year * 10000 + time.Month * 100),
5353

5454
// Group by year
5555
_ when now.Year == time.Year
56-
=> new Label("EarlierThisYear".GetLocalizedResource(), "\uEC92", 10001),
56+
=> new Label("EarlierThisYear".GetLocalizedResource(), "\uEC92", 10000001),
5757
_ when now.AddYears(-1).Year == time.Year
58-
=> new Label("LastYear".GetLocalizedResource(), "\uEC92", 10000),
58+
=> new Label("LastYear".GetLocalizedResource(), "\uEC92", 10000000),
5959
_
6060
=> new Label(string.Format("YearN".GetLocalizedResource(), time.Year), "\uEC92", time.Year),
6161
};

0 commit comments

Comments
 (0)