mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
Merge remote-tracking branch 'origin/ConnectPro_v1.1' into ConnectPro_v1.2
# Conflicts: # CHANGELOG.md # ICD.Common.Utils/Properties/AssemblyInfo.cs
This commit is contained in:
@@ -34,6 +34,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- Better VC-4 support for IcdConsole
|
- Better VC-4 support for IcdConsole
|
||||||
- JSON refactoring for simpler deserialization
|
- JSON refactoring for simpler deserialization
|
||||||
|
|
||||||
|
## [8.3.1] - 2019-04-05
|
||||||
|
### Changed
|
||||||
|
- Fixed FormatException when parsing some JSON DateTimes
|
||||||
|
|
||||||
## [8.3.0] - 2019-01-25
|
## [8.3.0] - 2019-01-25
|
||||||
### Added
|
### Added
|
||||||
- Added SimplSharpProMono to eRuntimeEnvironment enum
|
- Added SimplSharpProMono to eRuntimeEnvironment enum
|
||||||
|
|||||||
@@ -28,6 +28,16 @@ namespace ICD.Common.Utils.Json
|
|||||||
return DateTime.Parse(data);
|
return DateTime.Parse(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the data as a DateTime value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="data"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DateTime ParseDateTime(string data)
|
||||||
|
{
|
||||||
|
return DateTime.Parse(data);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the token as a DateTime value.
|
/// Gets the token as a DateTime value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -61,6 +71,10 @@ namespace ICD.Common.Utils.Json
|
|||||||
output = ParseDateTime(token);
|
output = ParseDateTime(token);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
catch (FormatException)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user