Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/Resources.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@
<comment>Fifth description</comment>
</data>
<data name="CommaOnThe" xml:space="preserve">
<value>, 在 </value>
<value>, 每月的</value>
<comment>OnThe description</comment>
</data>
<data name="SpaceX0OfTheMonth" xml:space="preserve">
<value>{0} 每月</value>
<value>{0}</value>
<comment>X0OfTheMonth description</comment>
</data>
<data name="CommaOnTheLastX0OfTheMonth" xml:space="preserve">
<value>, 每月的最后一个 {0} </value>
<value>, 每月的最后一个{0}</value>
<comment>OnTheLastX0OfTheMonth description</comment>
</data>
<data name="CommaOnlyOnX0" xml:space="preserve">
Expand Down Expand Up @@ -265,7 +265,7 @@
<comment>WeekdayNearestDayX0 description</comment>
</data>
<data name="CommaOnTheX0OfTheMonth" xml:space="preserve">
<value>, 每月的 {0} </value>
<value>, 每月的 {0}</value>
<comment>CommaOnTheX0OfTheMonth description</comment>
</data>
<data name="CommaEveryX0Days" xml:space="preserve">
Expand Down Expand Up @@ -301,7 +301,7 @@
<comment>CommaStartingX0 description</comment>
</data>
<data name="CommaDaysBeforeTheLastDayOfTheMonth" xml:space="preserve">
<value>, {0} 这个月的最后一天的前几天</value>
<value>, 每月的最后一天的前 {0} 天</value>
<comment>CommaDaysBeforeTheLastDayOfTheMonth description</comment>
</data>
<data name="CommaOnlyInYearX0" xml:space="preserve">
Expand Down
10 changes: 5 additions & 5 deletions lib/Resources.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@
<comment>Fifth description</comment>
</data>
<data name="CommaOnThe" xml:space="preserve">
<value>, 在 </value>
<value>, 每月的</value>
<comment>OnThe description</comment>
</data>
<data name="SpaceX0OfTheMonth" xml:space="preserve">
<value>{0} 每月</value>
<value>{0}</value>
<comment>X0OfTheMonth description</comment>
</data>
<data name="CommaOnTheLastX0OfTheMonth" xml:space="preserve">
<value>, 每月的最後一個 {0} </value>
<value>, 每月的最後一個{0}</value>
<comment>OnTheLastX0OfTheMonth description</comment>
</data>
<data name="CommaOnlyOnX0" xml:space="preserve">
Expand Down Expand Up @@ -265,7 +265,7 @@
<comment>WeekdayNearestDayX0 description</comment>
</data>
<data name="CommaOnTheX0OfTheMonth" xml:space="preserve">
<value>, 每月的 {0} </value>
<value>, 每月的 {0}</value>
<comment>CommaOnTheX0OfTheMonth description</comment>
</data>
<data name="CommaEveryX0Days" xml:space="preserve">
Expand Down Expand Up @@ -301,7 +301,7 @@
<comment>CommaStartingX0 description</comment>
</data>
<data name="CommaDaysBeforeTheLastDayOfTheMonth" xml:space="preserve">
<value>, {0} 這個月的最後一天的前幾天</value>
<value>, 每月的最後一天的前 {0} 天</value>
<comment>CommaDaysBeforeTheLastDayOfTheMonth description</comment>
</data>
<data name="CommaOnlyInYearX0" xml:space="preserve">
Expand Down
29 changes: 21 additions & 8 deletions test/TestFormats.zh-Hans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,26 @@ public void TestDayOfWeekRange()
[Fact]
public void TestDayOfWeekOnceInMonth()
{
Assert.Equal("每分钟, 在 第三个星期一 每月", GetDescription("* * * * MON#3"));
Assert.Equal("每分钟, 每月的第三个星期一", GetDescription("* * * * MON#3"));
}

[Fact]
public void TestLastDayOfTheWeekOfTheMonth()
{
Assert.Equal("每分钟, 每月的最后一个 星期四 ", GetDescription("* * * * 4L"));
Assert.Equal("每分钟, 每月的最后一个星期四", GetDescription("* * * * 4L"));
}

[Fact]
public void TestLastDayOffset()
{
Assert.Equal("在 12:00 AM, 每月的最后一天的前 5 天", GetDescription("0 0 0 L-5 * ?"));
Assert.Equal("在 12:00 AM, 每月的 1 号 和 每月的最后一天的前 3 天", GetDescription("0 0 1,L-3 * *"));
}

[Fact]
public void TestMultipleNthDayOfWeek()
{
Assert.Equal("在 09:00 AM, 每月的第二个 和 第四个 星期一", GetDescription("0 0 9 * * 1#2,1#4"));
}

[Fact]
Expand All @@ -186,25 +199,25 @@ public void TestLastWeekdayOfTheMonth2()
[Fact]
public void TestFirstWeekdayOfTheMonth()
{
Assert.Equal("每分钟, 每月的 第一个平日 ", GetDescription("* * 1W * *"));
Assert.Equal("每分钟, 每月的 第一个平日", GetDescription("* * 1W * *"));
}

[Fact]
public void TestFirstWeekdayOfTheMonth2()
{
Assert.Equal("每分钟, 每月的 第一个平日 ", GetDescription("* * W1 * *"));
Assert.Equal("每分钟, 每月的 第一个平日", GetDescription("* * W1 * *"));
}

[Fact]
public void TestParticularWeekdayOfTheMonth()
{
Assert.Equal("每分钟, 每月的 最接近 5 号的平日 ", GetDescription("* * 5W * *"));
Assert.Equal("每分钟, 每月的 最接近 5 号的平日", GetDescription("* * 5W * *"));
}

[Fact]
public void TestParticularWeekdayOfTheMonth2()
{
Assert.Equal("每分钟, 每月的 最接近 5 号的平日 ", GetDescription("* * W5 * *"));
Assert.Equal("每分钟, 每月的 最接近 5 号的平日", GetDescription("* * W5 * *"));
}

[Fact]
Expand Down Expand Up @@ -300,7 +313,7 @@ public void TestHourRange()
[Fact]
public void TestDayOfWeekModifier()
{
Assert.Equal("在 12:23 PM, 在 第二个星期日 每月", GetDescription("23 12 * * SUN#2"));
Assert.Equal("在 12:23 PM, 每月的第二个星期日", GetDescription("23 12 * * SUN#2"));
}

[Fact]
Expand All @@ -309,7 +322,7 @@ public void TestDayOfWeekModifierWithSundayStartOne()
Options options = new Options();
options.DayOfWeekStartIndexZero = false;

Assert.Equal("在 12:23 PM, 在 第二个星期日 每月", GetDescription("23 12 * * 1#2", options));
Assert.Equal("在 12:23 PM, 每月的第二个星期日", GetDescription("23 12 * * 1#2", options));
}

[Fact]
Expand Down
29 changes: 21 additions & 8 deletions test/TestFormats.zh-Hant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,26 @@ public void TestDayOfWeekRange()
[Fact]
public void TestDayOfWeekOnceInMonth()
{
Assert.Equal("每分鐘, 在 第三個星期一 每月", GetDescription("* * * * MON#3"));
Assert.Equal("每分鐘, 每月的第三個星期一", GetDescription("* * * * MON#3"));
}

[Fact]
public void TestLastDayOfTheWeekOfTheMonth()
{
Assert.Equal("每分鐘, 每月的最後一個 星期四 ", GetDescription("* * * * 4L"));
Assert.Equal("每分鐘, 每月的最後一個星期四", GetDescription("* * * * 4L"));
}

[Fact]
public void TestLastDayOffset()
{
Assert.Equal("在 12:00 AM, 每月的最後一天的前 5 天", GetDescription("0 0 0 L-5 * ?"));
Assert.Equal("在 12:00 AM, 每月的 1 號 和 每月的最後一天的前 3 天", GetDescription("0 0 1,L-3 * *"));
}

[Fact]
public void TestMultipleNthDayOfWeek()
{
Assert.Equal("在 09:00 AM, 每月的第二個 和 第四個 星期一", GetDescription("0 0 9 * * 1#2,1#4"));
}

[IgnoreOnWindowsFact]
Expand All @@ -186,25 +199,25 @@ public void TestLastWeekdayOfTheMonth2()
[Fact]
public void TestFirstWeekdayOfTheMonth()
{
Assert.Equal("每分鐘, 每月的 第一個平日 ", GetDescription("* * 1W * *"));
Assert.Equal("每分鐘, 每月的 第一個平日", GetDescription("* * 1W * *"));
}

[Fact]
public void TestFirstWeekdayOfTheMonth2()
{
Assert.Equal("每分鐘, 每月的 第一個平日 ", GetDescription("* * W1 * *"));
Assert.Equal("每分鐘, 每月的 第一個平日", GetDescription("* * W1 * *"));
}

[Fact]
public void TestParticularWeekdayOfTheMonth()
{
Assert.Equal("每分鐘, 每月的 最接近 5 號的平日 ", GetDescription("* * 5W * *"));
Assert.Equal("每分鐘, 每月的 最接近 5 號的平日", GetDescription("* * 5W * *"));
}

[Fact]
public void TestParticularWeekdayOfTheMonth2()
{
Assert.Equal("每分鐘, 每月的 最接近 5 號的平日 ", GetDescription("* * W5 * *"));
Assert.Equal("每分鐘, 每月的 最接近 5 號的平日", GetDescription("* * W5 * *"));
}

[Fact]
Expand Down Expand Up @@ -300,7 +313,7 @@ public void TestHourRange()
[Fact]
public void TestDayOfWeekModifier()
{
Assert.Equal("在 12:23 PM, 在 第二個星期日 每月", GetDescription("23 12 * * SUN#2"));
Assert.Equal("在 12:23 PM, 每月的第二個星期日", GetDescription("23 12 * * SUN#2"));
}

[Fact]
Expand All @@ -309,7 +322,7 @@ public void TestDayOfWeekModifierWithSundayStartOne()
Options options = new Options();
options.DayOfWeekStartIndexZero = false;

Assert.Equal("在 12:23 PM, 在 第二個星期日 每月", GetDescription("23 12 * * 1#2", options));
Assert.Equal("在 12:23 PM, 每月的第二個星期日", GetDescription("23 12 * * 1#2", options));
}

[Fact]
Expand Down
Loading