Skip to content

Commit

Permalink
推送包
Browse files Browse the repository at this point in the history
  • Loading branch information
zan.dai committed Jun 4, 2021
1 parent 0eee501 commit f644379
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 14 deletions.
2 changes: 1 addition & 1 deletion LBON.Consts/LBON.Consts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Lu Ban Of .Net - .Net 高可用、高效率的扩展组件</Description>
<ReleaseVersion>0.0.1</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
<Version>2.0.1.4</Version>
<Version>2.0.1.5</Version>
<Copyright>CacoCode</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/CacoCode/LBON</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion LBON.DependencyInjection/LBON.DependencyInjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Lu Ban Of .Net - .Net 高可用、高效率的扩展组件</Description>
<ReleaseVersion>2.0.1.4</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
<Version>2.0.1.4</Version>
<Version>2.0.1.5</Version>
<Copyright>CacoCode</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/CacoCode/LBON</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion LBON.EntityFrameworkCore/LBON.EntityFrameworkCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Lu Ban Of .Net - .Net 高可用、高效率的扩展组件</Description>
<ReleaseVersion>2.0.1.4</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
<Version>2.0.1.4</Version>
<Version>2.0.1.5</Version>
<Copyright>CacoCode</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/CacoCode/LBON</PackageProjectUrl>
Expand Down
22 changes: 22 additions & 0 deletions LBON.Extensions/DateTimeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ public static int TotalDaysInMonth(this DateTime dateTime)
return DaysOfMonth(dateTime.Year, dateTime.Month).Count();
}

/// <summary>
/// Get the first day in a month
/// </summary>
/// <param name="dateTime">The date time.</param>
/// <returns></returns>
[Description("获取一个月内的第一天")]
public static DateTime FirstInMonth(this DateTime dateTime)
{
return DateTime.Now.AddDays(1 - DateTime.Now.Day);
}

/// <summary>
/// Get the Last Day in a Month 23:59:59
/// </summary>
/// <param name="dateTime"></param>
/// <returns></returns>
[Description("获取一个月内的最后一天 23:59:59")]
public static DateTime LastInMonth(this DateTime dateTime)
{
return DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1);
}

/// <summary>
/// Takes any date and returns it's value as an Unspecified DateTime
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion LBON.Extensions/LBON.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Lu Ban Of .Net - .Net 高可用、高效率的扩展组件</Description>
<ReleaseVersion>0.0.1</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
<Version>2.0.1.4</Version>
<Version>2.0.1.5</Version>
<PackageIcon>logo.png</PackageIcon>
<Copyright>CacoCode</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion LBON.Helper/LBON.Helper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.1.4</Version>
<Version>2.0.1.5</Version>
<Authors>CacoCode</Authors>
<Company>CacoCode</Company>
<Description>Lu Ban Of .Net - .Net 高可用、高效率的扩展组件</Description>
Expand Down
2 changes: 2 additions & 0 deletions Readmes/Extensions/DATETIMEEXTENSIONS_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- <code>DaysOfMonth</code> 获取一个月的所有日期
- <code>WeekDayInstanceOfMonth</code> 获取当前日期在一个月的第几个星期
- <code>TotalDaysInMonth</code> 获取一个月内的总天数
- <code>FirstInMonth</code> 获取一个月内的第一天
- <code>LastInMonth</code> 获取一个月内的最后一天 23:59:59
- <code>ToDateTimeUnspecified</code> 获取Unspecified日期
- <code>TrimMilliseconds</code> 将日期时间缩短毫秒
- <code>ClearTime</code> 清除时间
11 changes: 5 additions & 6 deletions Readmes/Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static void Main(string[] args)
{
if (args.Length != 2)
{
throw new ArgumentException();
throw new ArgumentNullException();
}
Console.WriteLine("========================Generate Extensions Readmes Start========================");
GenerateExtensionsReadmes(args);
Expand All @@ -28,9 +28,8 @@ private static void GenerateExtensionsReadmes(string[] args)
var classes = Assembly.Load("LBON.Extensions").GetTypes().Where(a => a.Name.EndsWith("Extensions")).ToList();
foreach (var item in classes)
{
//var dirPath = "E:\\Codes\\LBON\\Readmes\\Extensions";
var dirPath = Path.Combine("Readmes", args[0]);
var filePath = Path.Combine(dirPath, $"{item.Name.ToUpper()}_README.md");
//var dirPath = Path.Combine("Readmes", args[0]);
var filePath = Path.Combine(args[0], $"{item.Name.ToUpper()}_README.md");
if (File.Exists(filePath))
{
File.Delete(filePath);
Expand Down Expand Up @@ -61,8 +60,8 @@ private static void GenerateHeleperReadmes(string[] args)
foreach (var item in classes)
{
//var dirPath = "E:\\Codes\\LBON\\Readmes\\Helper";
var dirPath = Path.Combine("Readmes", args[1]);
var filePath = Path.Combine(dirPath, $"{item.Name.ToUpper()}_README.md");
//var dirPath = Path.Combine("Readmes", args[1]);
var filePath = Path.Combine(args[1], $"{item.Name.ToUpper()}_README.md");
if (File.Exists(filePath))
{
File.Delete(filePath);
Expand Down
6 changes: 3 additions & 3 deletions Readmes/Generator/Readme.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LBON.Consts" Version="2.0.1.3" />
<PackageReference Include="LBON.Extensions" Version="2.0.1.3" />
<PackageReference Include="LBON.Helper" Version="2.0.1.3" />
<PackageReference Include="LBON.Consts" Version="2.0.1.5" />
<PackageReference Include="LBON.Extensions" Version="2.0.1.5" />
<PackageReference Include="LBON.Helper" Version="2.0.1.5" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions Readmes/Helper/TYPEHELPER_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TypeHelper
- <code>IsFunc</code>
- <code>IsFunc</code>
- <code>IsPrimitiveExtendedIncludingNullable</code>

0 comments on commit f644379

Please sign in to comment.