diff --git a/LBON.Consts/LBON.Consts.csproj b/LBON.Consts/LBON.Consts.csproj
index 5d14fa7..d644530 100644
--- a/LBON.Consts/LBON.Consts.csproj
+++ b/LBON.Consts/LBON.Consts.csproj
@@ -5,7 +5,7 @@
Lu Ban Of .Net - .Net 高可用、高效率的扩展组件
0.0.1
false
- 2.0.1.4
+ 2.0.1.5
CacoCode
LICENSE
https://github.com/CacoCode/LBON
diff --git a/LBON.DependencyInjection/LBON.DependencyInjection.csproj b/LBON.DependencyInjection/LBON.DependencyInjection.csproj
index de50b7b..e42325d 100644
--- a/LBON.DependencyInjection/LBON.DependencyInjection.csproj
+++ b/LBON.DependencyInjection/LBON.DependencyInjection.csproj
@@ -5,7 +5,7 @@
Lu Ban Of .Net - .Net 高可用、高效率的扩展组件
2.0.1.4
false
- 2.0.1.4
+ 2.0.1.5
CacoCode
LICENSE
https://github.com/CacoCode/LBON
diff --git a/LBON.EntityFrameworkCore/LBON.EntityFrameworkCore.csproj b/LBON.EntityFrameworkCore/LBON.EntityFrameworkCore.csproj
index 4bb4557..7d1b48b 100644
--- a/LBON.EntityFrameworkCore/LBON.EntityFrameworkCore.csproj
+++ b/LBON.EntityFrameworkCore/LBON.EntityFrameworkCore.csproj
@@ -5,7 +5,7 @@
Lu Ban Of .Net - .Net 高可用、高效率的扩展组件
2.0.1.4
false
- 2.0.1.4
+ 2.0.1.5
CacoCode
LICENSE
https://github.com/CacoCode/LBON
diff --git a/LBON.Extensions/DateTimeExtensions.cs b/LBON.Extensions/DateTimeExtensions.cs
index 6e5b9e6..568fef3 100644
--- a/LBON.Extensions/DateTimeExtensions.cs
+++ b/LBON.Extensions/DateTimeExtensions.cs
@@ -101,6 +101,28 @@ public static int TotalDaysInMonth(this DateTime dateTime)
return DaysOfMonth(dateTime.Year, dateTime.Month).Count();
}
+ ///
+ /// Get the first day in a month
+ ///
+ /// The date time.
+ ///
+ [Description("获取一个月内的第一天")]
+ public static DateTime FirstInMonth(this DateTime dateTime)
+ {
+ return DateTime.Now.AddDays(1 - DateTime.Now.Day);
+ }
+
+ ///
+ /// Get the Last Day in a Month 23:59:59
+ ///
+ ///
+ ///
+ [Description("获取一个月内的最后一天 23:59:59")]
+ public static DateTime LastInMonth(this DateTime dateTime)
+ {
+ return DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1);
+ }
+
///
/// Takes any date and returns it's value as an Unspecified DateTime
///
diff --git a/LBON.Extensions/LBON.Extensions.csproj b/LBON.Extensions/LBON.Extensions.csproj
index 3df687f..95bd17b 100644
--- a/LBON.Extensions/LBON.Extensions.csproj
+++ b/LBON.Extensions/LBON.Extensions.csproj
@@ -5,7 +5,7 @@
Lu Ban Of .Net - .Net 高可用、高效率的扩展组件
0.0.1
false
- 2.0.1.4
+ 2.0.1.5
logo.png
CacoCode
LICENSE
diff --git a/LBON.Helper/LBON.Helper.csproj b/LBON.Helper/LBON.Helper.csproj
index 0266965..6e8a176 100644
--- a/LBON.Helper/LBON.Helper.csproj
+++ b/LBON.Helper/LBON.Helper.csproj
@@ -2,7 +2,7 @@
netstandard2.0
- 2.0.1.4
+ 2.0.1.5
CacoCode
CacoCode
Lu Ban Of .Net - .Net 高可用、高效率的扩展组件
diff --git a/Readmes/Extensions/DATETIMEEXTENSIONS_README.md b/Readmes/Extensions/DATETIMEEXTENSIONS_README.md
index 103d884..b211755 100644
--- a/Readmes/Extensions/DATETIMEEXTENSIONS_README.md
+++ b/Readmes/Extensions/DATETIMEEXTENSIONS_README.md
@@ -6,6 +6,8 @@
- DaysOfMonth
获取一个月的所有日期
- WeekDayInstanceOfMonth
获取当前日期在一个月的第几个星期
- TotalDaysInMonth
获取一个月内的总天数
+- FirstInMonth
获取一个月内的第一天
+- LastInMonth
获取一个月内的最后一天 23:59:59
- ToDateTimeUnspecified
获取Unspecified日期
- TrimMilliseconds
将日期时间缩短毫秒
- ClearTime
清除时间
\ No newline at end of file
diff --git a/Readmes/Generator/Program.cs b/Readmes/Generator/Program.cs
index 2d60313..821f777 100644
--- a/Readmes/Generator/Program.cs
+++ b/Readmes/Generator/Program.cs
@@ -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);
@@ -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);
@@ -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);
diff --git a/Readmes/Generator/Readme.Generator.csproj b/Readmes/Generator/Readme.Generator.csproj
index 30fdf1f..595a282 100644
--- a/Readmes/Generator/Readme.Generator.csproj
+++ b/Readmes/Generator/Readme.Generator.csproj
@@ -6,9 +6,9 @@
-
-
-
+
+
+
diff --git a/Readmes/Helper/TYPEHELPER_README.md b/Readmes/Helper/TYPEHELPER_README.md
new file mode 100644
index 0000000..666b08d
--- /dev/null
+++ b/Readmes/Helper/TYPEHELPER_README.md
@@ -0,0 +1,4 @@
+# TypeHelper
+- IsFunc
+- IsFunc
+- IsPrimitiveExtendedIncludingNullable
\ No newline at end of file