当前位置: 首页>>代码示例>>C#>>正文


C# DateTimeOffset.BeginningOfDay方法代码示例

本文整理汇总了C#中DateTimeOffset.BeginningOfDay方法的典型用法代码示例。如果您正苦于以下问题:C# DateTimeOffset.BeginningOfDay方法的具体用法?C# DateTimeOffset.BeginningOfDay怎么用?C# DateTimeOffset.BeginningOfDay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DateTimeOffset的用法示例。


在下文中一共展示了DateTimeOffset.BeginningOfDay方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LastDayOfQuarter_Q4_SetsTheDayToLastDayOfQuarter

 public void LastDayOfQuarter_Q4_SetsTheDayToLastDayOfQuarter()
 {
     var expected = new DateTimeOffset(2002, 12, 31, 4, 5, 6, TimeSpan.Zero);
     Assert.AreEqual(expected.BeginningOfDay(), new DateTimeOffset(2002, 11, 22, 12, 12, 12, TimeSpan.Zero).LastDayOfQuarter().BeginningOfDay());
 }
开发者ID:jin29neci,项目名称:FluentDateTime,代码行数:5,代码来源:DateTimeOffsetTests.cs

示例2: FirstDayOfQuarter_Q4_SetsDayToFirstDay

 public void FirstDayOfQuarter_Q4_SetsDayToFirstDay()
 {
     var expected = new DateTimeOffset(2002, 10, 1, 7, 8, 9, TimeSpan.Zero);
     Assert.AreEqual(expected.BeginningOfDay(), new DateTimeOffset(2002, 11, 22, 12, 12, 12, TimeSpan.Zero).FirstDayOfQuarter().BeginningOfDay());
 }
开发者ID:jin29neci,项目名称:FluentDateTime,代码行数:5,代码来源:DateTimeOffsetTests.cs

示例3: NextQuarter_LastDay_SetsTheDayToLastDayOfQuarter

 public void NextQuarter_LastDay_SetsTheDayToLastDayOfQuarter()
 {
     var expected = new DateTimeOffset(2002, 6, 30, 3, 5, 6, TimeSpan.Zero);
     Assert.AreEqual(expected.BeginningOfDay(), 1.Quarters().From(new DateTimeOffset(2002, 1, 10, 4, 5, 6, TimeSpan.Zero).LastDayOfQuarter().BeginningOfDay()));
 }
开发者ID:jin29neci,项目名称:FluentDateTime,代码行数:5,代码来源:DateTimeOffsetTests.cs

示例4: FirstDayOfQuarter_SetsTheDayToOne

 public void FirstDayOfQuarter_SetsTheDayToOne()
 {
     var expected = new DateTimeOffset(2002, 1, 1, 6, 3, 0, TimeSpan.Zero);
     Assert.AreEqual(expected.BeginningOfDay(), new DateTimeOffset(2002, 3, 22, 12, 12, 12, TimeSpan.Zero).FirstDayOfQuarter().BeginningOfDay());
 }
开发者ID:jin29neci,项目名称:FluentDateTime,代码行数:5,代码来源:DateTimeOffsetTests.cs

示例5: PreviousQuarter_LastDay_SetsTheDayToLastDayOfQuarter

 public void PreviousQuarter_LastDay_SetsTheDayToLastDayOfQuarter()
 {
     var expected = new DateTimeOffset(2001, 12, 31, 3, 5, 6, TimeSpan.Zero);
     Assert.AreEqual(expected.BeginningOfDay(), 1.Quarters().Ago(new DateTimeOffset(2002, 1, 10, 4, 5, 6, TimeSpan.Zero).LastDayOfQuarter().BeginningOfDay()));
 }
开发者ID:jin29neci,项目名称:FluentDateTime,代码行数:5,代码来源:DateTimeOffsetTests.cs


注:本文中的DateTimeOffset.BeginningOfDay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。